0

I need to override the file Magento\Framework\Search\Adapter\Mysql\Query\Builder\match.php and make the

const MINIMAL_CHARACTER_LENGTH = 3;

to

const MINIMAL_CHARACTER_LENGTH = 1;

should I change it in vendor itself or override. help me with the override.

Minimal Query Length under Stores -> Configuration -> Catalog -> Catalog Search is set to be 1 enter image description here

1

Try changing the setting Minimal Query Length under Stores -> Configuration -> Catalog -> Catalog Search
I think changing this setting will be the same and will fulfil your requirement.

  • Already the "Minimal Query Length" is set to be 1 – Anandhu Vijayan May 17 '18 at 6:19
  • @AnandhuVijayan What exactly os your requirement. Why do you want to change this value? – Anshu Mishra May 17 '18 at 11:56
  • In my project most of the product have 2 letter items like (GX,IC etc..).So I need to start search with 2 character, now "no result" dialog is shown when count is 2. I need to start search at 2 character. I try to change the count in admin panel as above (Screen shot) . But thus didn't works. When I change the core value it works fine. That's why I need to override this file. – Anandhu Vijayan May 18 '18 at 4:44

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.