Prevent Word Order from mattering when Filtering

I am searching for a page with the name “Tea for Technology”. When I search “tea tech” I get results, but I get nothing for “tech tea”. Using the JavaScript API how do I make the word order not matter?

Results order does not matter to me at this point, I just need the actual results.

Thanks, Jim

Hi @jstevensonph,

There is a configuration option called queryType that lets you customise how the prefix search works. By default this option is set to prefixLast it means that only the last word of the query is interpreted as a prefix. But you can update it to prefixAll it means that all the query words will be interpreted as prefixes. You can find more details about that in our documentation.

For this option you can edit it in the dashboard in the “Ranking” section of your index.

Hope that helps, let me know if you have questions. :slightly_smiling_face:

Thank you very much, that did it.

I feel like that documentation could use use some examples, as I had to read through it multiple times before I understood why it did/didn’t work in my case.

Glad to see that solved your issue!

Thanks for the feedbacks :wink: