What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

API Search is failing to returning products in a relevant order as expected

API Search is failing to returning products in a relevant order as expected

natalie_p
Visitor
3 0 0

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? 

Replies 4 (4)

SoBooster
Shopify Partner
36 1 1

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.

natalie_p
Visitor
3 0 0

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 

SoBooster
Shopify Partner
36 1 1

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.

natalie_p
Visitor
3 0 0

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