Documentation
Feedback
Guides

Setting up brand search queries as full text

Learn how to resolve brand search queries in Intelligent Search as full text.

By default, when searching for a brand using the search bar with Intelligent Search, the results only display products that are registered in the catalog under that specific brand. A brand filter is applied to the search, meaning if the brand does not exist in the store’s catalog, the search does not return any results.

However, you can modify this behavior to treat brand searches as full text. This means you can show products that contain the brand name in the product title, description or any product field.

This guide explains how to change the default behavior to resolve brand search queries in Intelligent Search, enabling them to be resolved as full text.

Before you begin

Make sure that Intelligent Search is installed and set up in your store.

Instructions

Step 1 - Setting up the Store Indexer app

Follow the instructions below to enable brand search as full text when receiving catalog notifications using the Store Indexer app:

  1. On VTEX Admin, go to Apps > Extensions Hub > App Management, or access https://{accountName}.myvtex.com/admin/apps directly.
  2. In the My Apps page, search for the store indexer as shown below. If it doesn’t appear at first, run vtex install vtex.store-indexer using VTEX IO CLI and refresh the page.
    An error occurred while loading the image https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@maindocs/guides/Search/setting-up-brand-search-queries-as-full-text-1.png
  3. In the Store Indexer card, click Settings.
  4. In the Brand Queries Map field, select Full Text.
    An error occurred while loading the image https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@maindocs/guides/Search/setting-up-brand-search-queries-as-full-text-2.png
  5. Click Save.

If you need to revert back to the default behavior, repeat the instructions above, changing step 4 back to Brand.

Step 2 - Changing the existing routes in Rewriter

To configure the Rewriter app to resolve brand routes using the full text method, follow these instructions:

  1. Go to https://{accountName}.myvtex.com/admin/graphql-ide.

  2. Search for routes-bootstrap. This app gets data from the catalog and creates, translates and saves brand, department, category and subcategory routes to Rewriter.

  3. Run the following GraphQL query:


    _10
    {
    _10
    bootstrap{
    _10
    brands(resolveMapQueryAs: FT)
    _10
    }
    _10
    }

After configuring the full text search for brands, follow these steps to verify that it works correctly:

  1. Go to your store's website.
  2. Search for a brand using the search bar.
  3. Open a new tab and go to Storefront > Intelligent Search > Explained Search on VTEX Admin or visit https://{accountName}.myvtex.com/admin/search/explained-search.
  4. Compare the search results displayed on your storefront with the Explained Search results on VTEX Admin.
Contributors
1
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
Was this helpful?
Suggest edits (GitHub)
On this page