Magento2: Minimal Query Length For Catalog Search

Created on 20 Sep 2016  路  4Comments  路  Source: magento/magento2

Preconditions

  1. Magento2 EE
  2. Magento2 CE

Steps to reproduce

  1. Navigate to Store > Configuration > Catalog and choose Catalog. After that, expand the Catalog Search section and Set Minimal Query Length to 1
  2. Try to search
  3. Always get the 0 result

Expected result

  1. if Magento is allowing to set minimum query value to 1 from admin then it should work with that scenario otherwise just put message minimum query length 1 is not allowed

Actual result

  1. [Screenshot, logs]
Search Clear Description Confirmed Format is valid Ready for Work Reproduced on 2.1.x Reproduced on 2.2.x Reproduced on 2.3.x bug report triage wanted

Most helpful comment

I found the core file where its defined as a constant for minimal character count even admin have configuration for that.

vendor\magento\frameworkSearch\Adapter\Mysql\Query\BuilderMatch.php (MINIMAL_CHARACTER_LENGTH)

Make sure the MySQL variable(ft_min_word_len=2) set as you want to search.

I hope this hot fix will help.

All 4 comments

Hi @gajjardhara, thank you for your report
We've created internal ticket MAGETWO-58764 to address this issue.

I found the core file where its defined as a constant for minimal character count even admin have configuration for that.

vendor\magento\frameworkSearch\Adapter\Mysql\Query\BuilderMatch.php (MINIMAL_CHARACTER_LENGTH)

Make sure the MySQL variable(ft_min_word_len=2) set as you want to search.

I hope this hot fix will help.

@gajjardhara, thank you for your report.
We've created internal ticket(s) MAGETWO-58764 to track progress on the issue.

@gajjardhara, thank you for your report.

Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily.

You may learn more about this initiative following this link.

Please feel free to comment or reopen the ticket if you think it should be reviewed once more. Thank you for collaboration.

Was this page helpful?
0 / 5 - 0 ratings