{"section":"troubleshooting","requestedLocale":"en","requestedSlug":"i-cant-view-the-product-in-the-search-results","locale":"en","slug":"i-cant-view-the-product-in-the-search-results","path":"docs/en/troubleshooting/merchandising-and-search/i-cant-view-the-product-in-the-search-results.md","branch":"main","content":"When the user searches in a VTEX store using [Intelligent Search](/en/docs/tracks/overview-intelligent-search), the desired product may not be found, even if the search term is included in the item's information.\n\nExample scenario: When searching the store's website for products containing the term \"Pendleton,\" the search results return 6 products. However, when we access the VTEX Admin (__Storefront > Intelligent Search > Explained Search__) and enter the same term, 9 products are displayed.\n\n![Filter_1](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/troubleshooting/merchandising-and-search/i-cant-view-the-product-in-the-search-results_1.png)\n\n![Filter_2](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/troubleshooting/merchandising-and-search/i-cant-view-the-product-in-the-search-results_2.png)\n\nThis behavior can occur due to the following reasons:\n\n1. Incorrect product registration in the Catalog.\n\n2. The term used is not in one of the product's searchable fields. Learn more about [Search behavior configuration](/en/docs/tutorials/search-behavior#standard-search-behavior) and [Search configuration](/en/docs/tutorials/search-configuration).\n\n3. Internal route redirecting the search result to a brand page.\n\n## Solutions\n\nTo enable the searched products to be displayed correctly in the site's search results, consider the following solutions:\n\n- [Verify product registration fields](#verifying-product-registration-fields)\n- [Change search filters in Rewriter](#changing-search-filters-in-rewriter)\n- [Removing internal search route in Rewriter](#removing-internal-search-route-in-rewriter)\n\n### Verifying product registration fields\n\nA missing product in a search result may come from incomplete fields during the [product registration](/en/docs/tutorials/adding-or-editing-products). Follow the steps below to check the __Brand, Show on site__, and __Show when out of stock__ fields:\n\n1. In the Admin VTEX, go to **Catalog > All Products**.\n\n> ⚠️ Stores using the **Products and SKUS (Beta)** page should check the product registration fields by going to **Catalog > Products and SKUs** in the VTEX Admin. Learn more about [Produtos and SKUS (Beta)](/en/docs/tutorials/products-and-skus).\n\n2. Find the product you want and click **Edit product**.\n\n3. In the **Brand** field, confirm if the information is correct. If necessary, add the brand corresponding to the product. You can only add brands that have already been [created in the store](/en/docs/tracks/create-brands).\n\n4. Confirm if the **Show on site** option is checked.\n\n5. Confirm if the **Show when out of stock** option is checked.\n\n6. Click _Save_.\n\n7. Go to the store's website, search for the desired term, and ensure that the products displayed in the search results are the same as the ones available on the **Explained Search** page under Intelligent Search (**Storefront > Intelligent Search > Explained Search**).\n\n> ⚠️ If the search term is included in the product's name or description, but the product belongs to a different brand than the term specified in the search, proceed with the other steps to solve the problem.\n\n### Changing search filters in Rewriter\n\nAnother reason a product may not be displayed in search results is the [Rewriter](https://developers.vtex.com/docs/apps/vtex.rewriter) app's default behavior when displaying products.\n\nIf a term is listed in Rewriter as a brand, [Intelligent Search](/en/docs/tutorials/explained-search) will understand that it should only be displayed when it is included in a brand name.\n\nTo remove the restriction on searching by *brand* and allow products to be found also by terms in the name or description (*full text*), follow the steps below:\n\n1. In the VTEX Admin, go to **Storefront > Intelligent Search > Explained Search** enter the desired term, and see how many products are returned in the search.\n\n2. Configure the [Rewriter](https://developers.vtex.com/docs/apps/vtex.rewriter) app. If this app is not installed in your store, go to the [App Store](/en/docs/tracks/extensions-hub-app-store) and install it.\n\n3. Access the [GraphQL IDE](https://developers.vtex.com/docs/guides/graphql-ide#graphql-basics) in **Store Settings > Storefront > GraphQL IDE**.\n\n4. Under **Choose an app**, click the Rewriter app option (**vtex.rewriter@\\{app-version-number\\}**).\n\n![Graphql_ide_en](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/troubleshooting/merchandising-and-search/i-cant-view-the-product-in-the-search-results_3.png)\n\n5. In the query input field (below **GraphiQL**), enter the details of the _saveInternal_ mutation function.\n\n    ```graphql\n    mutation saverInternal($route: InternalInput!) {\n    internal {\n     save(route: $route) {\n       from\n       declarer\n       type\n       id\n       query\n       endDate\n       binding\n       resolveAs\n       origin\n       disableSitemapEntry\n     }\n    }\n    }\n    ```\n\n6. In **Query Variables**, enter the route details. You must replace the _Pendleton_ value with the desired term and the _id_ field value with the product ID.\n\n    ```graphql\n    {\n    \"route\": {\n     \"from\": \"/Pendleton\",\n     \"declarer\": \"vtex.store@2.x\",\n     \"type\": \"fullText\",\n     \"id\": \"2000307\",\n     \"query\": {\n         \"map\": \"ft\"\n     },\n       \"origin\": \"user-canonical\"\n     }\n    }\n    ```\n\n> ⚠️ The value *ft* (full text) instead of *b* (brand) in the *map* parameter indicates that products with the term *Pendleton* in the name or description will also be displayed in the search.\n\n7. Click the GraphiQL IDE arrow (next to **GraphiQL**) to update the search filter. The display of the following message in the GraphiQL IDE results field will confirm the new default search filter for the term.\n\n    ```graphql\n    {\n      \"data\": {\n        \"internal\": {\n          \"save\": {\n            \"from\": \"/Pendleton\",\n            \"declarer\": \"vtex.store@2.x\",\n            \"type\": \"fullText\",\n            \"id\": \"2000307\",\n            \"query\": {\n              \"map\": \"ft\"\n            },\n            \"endDate\": null,\n            \"binding\": \"0be568e5-52f5-44f0-9308-3ea701a9f847\",\n            \"resolveAs\": null,\n            \"origin\": \"user-canonical\",\n            \"disableSitemapEntry\": null\n          }\n        }\n      }\n    }\n    ```\n\n8. Go to the store's website, search for the desired term, and ensure that the products displayed in the search results are the same as the ones available on the **Explained Search** page under Intelligent Search (**Storefront > Intelligent Search > Explained Search**).\n\n> ⚠️ If the search term is associated with a brand that no longer exists on your site, you will need to remove the internal search route within the Rewriter app, as described in the solution below</a>.\n\n### Removing internal search route in Rewriter\n\n[Internal search routes](https://developers.vtex.com/docs/guides/vtex-io-documentation-routes#routes-in-rewriter) in the [Rewriter](https://developers.vtex.com/docs/apps/vtex.rewriter) app can prevent a product from being displayed in the search if it is associated with a brand that is no longer available in the store.\n\nTo display products using the search terms only in the name or description, you need to delete the search route.\n\nTo remove an internal search route for the term, follow the steps below:\n\n1. In the VTEX Admin, go to [GraphQL IDE](https://developers.vtex.com/docs/guides/graphql-ide#graphql-basics) in **Store Settings > Storefront > GraphQL IDE**.\n\n2. Under **Choose an app**, click the Rewriter app option (**vtex.rewriter@\\{app-version-number\\}**).\n\n3. In the query input field (below **GraphiQL**), enter the data for the _internal get_ function, replacingo _pendleton_ with the desired term.\n\n    ```graphql\n    {\n      internal {\n        get(path: \"/Pendleton\") {\n          from\n          resolveAs\n          type\n        }\n      }\n    }\n    ```\n\n4. Click the GraphiQL IDE arrow (next to **GraphiQL**) and check the results field to see if the internal route is described as a _brand_.\n\n    ```graphql\n    {\n      \"data\": {\n        \"internal\": {\n          \"get\": {\n            \"from\": \"/Pendleton\",\n            \"resolveAs\": \"/Pendleton\",\n            \"type\": \"brand\"\n          }\n        }\n      }\n    }\n    ```\n\n5. In the query input field (below **GraphiQL**), enter the data for the _mutation_ function, replacing _pendleton_ with the desired term.\n\n    ```graphql\n    mutation {\n      internal {\n        delete(path: \"/Pendleton\"){\n          type\n        }\n      }\n    }\n    ```\n\n6. Click the GraphiQL IDE arrow (next to **GraphiQL**) to remove the internal filter route by _brand_ and confirm that the information below appears in the GraphiQL IDE results field.\n\n    ```graphql\n    {\n      \"data\": {\n        \"internal\": {\n          \"delete\": {\n            \"type\": \"brand\"\n          }\n        }\n      }\n    }\n    ```\n\n7. Repeat steps 3 and 4 to confirm that the internal redirection route from term to brand has been deleted. This can be indicated by the _\"get\": null_ result in the GraphiQL IDE results field.\n\n    ```graphql\n    {\n      \"data\": {\n        \"internal\": {\n          \"get\": null\n        }\n      }\n    }\n    ```\n\n8. Go to the store's website, search for the desired term, and ensure that the products displayed in the search results are the same as the ones available on the **Explained Search** page under Intelligent Search (**Storefront > Intelligent Search > Explained Search**)."}