I have a Magento 2 site that is set up to sell books. I have attributes Author and Publisher that are both set to "Use in Search" and "Visible in Advanced Search".

The issue is when searching Author for say "James Patterson" I get every item that has either "James" or "Patterson" in the Author attribute, and exact matches are scattered through out the results, especially when searching with other attributes.

I've already created a module and edited

app/code/vendor/extension/etc/search_request.xml by changing

<queryReference clause="should" ref="search" />
<queryReference clause="must" ref="search" />

This helps the quick search but has no effect on advanced search.

Is there a way to force advanced search do an exact match, even on if it is on certain attributes?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.