Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi there,
We are using the API call to produce search results in our app search for products. We are using fuzzy search so that products with relevant titles and descriptions are returned.
When searching 'lavender' items we would expect to show first as most relevant (with lavender in the product title) are being returned 16th+ product in search results.
Is there a way to weight search results so that items with the keyword in their product title are returned first in search results?
The native Shopify search may actually use the same weight for both Title and Description. If you want a more advanced search solution, you may want to try this one https://apps.shopify.com/ultimate-search-and-filter-1.
This app lets you control weight of product search fields.
1. In this app, go to App settings => Search index.
2. Enable Product description field
3. Expand its settings and set Weight to like 0.3. Its default weight is 0.9 which is already less than the Title.
Hi this doesn't offer me a solution as we are using the API to pull product search results through to the e-commerce app we are building I need a solution through the API call not a plug in app
I understand. Unfortunately it's not possible with the current Shopify search api. Or you may need to build your own API, which is very complicated.
Can you recommend any other solutions to achieve this? It seems strange that a shopify search API has no options to make search results relevant