How to exclude short words (one or two letters) in Magento2 catalog-search?

Take for example the word of, which I want to exclude.

If any customer search for Game of Thrones the query has to exclude the word of and pass only Game Thrones and show related results.

I hope there is some if(length(.)<=2) to put somewhere in the code.

Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.