Pregunta

In my shopify store search algorithm seems to look for whole words only. For example if I have a product "keyboard" in my store, "key" doesn't find it.

Is there any way to change that?

¿Fue útil?

Solución

Search is controlled by Shopify. The only thing you can do is inspect the results returned and render the results as you see fit. Another option is to build out your own search functionality and then you can indeed control the algorithm. That requires you to deploy your own high-performance server and to take advantage of an App Proxy from Shopify or to just manually render results as HTML or JSON...

Otros consejos

David is right. The search functionality is controlled by Shopify, and unfortunately this functionality doesn't recognise partial strings (see this support thread for a little more info).

My suggestion is either build your own search functionality or make use of a plugin like typeahead.js to help bypass the issue.

The other guys are right - you don't have much control over the search in Shopify. However, the support thread mentioned in luciddarryn's answer talks about the limitations of Shopify's admin search. In your store's product search, you can use Solr syntax for partial words. See here and here for more info. You could also have a look on the Shopify app store for a search app with the functionality you're after.

Add an asterisk to the end of the search term, so instead of key, it would be key*.

The asterisk turns it into a wild-card search.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top