Skip to content

Elastic Search issue with Synonyms #30104

Closed
@soumiktuban

Description

@soumiktuban

Preconditions (*)

  1. Magento 2.3.*.
  2. Elasticsearch 6+

Also reproducible on 2.4-develop with Elasticsearch7

Steps to reproduce (*)

  1. Enable Elasticsearch 6+
  2. Add a product with a long name with a slash / in it.
    Example: LSS 3/8"X3/4"X25' EZ-PULL 1/2" INS SWEAT LINESET W/90 END BEND SUCTION LINE INSULATED
  3. Add Search Synonyms with a word belongs to the product name.
    Example: center end boot,torpedo boot,horn boot,register boot center end,register boot torpedo
  4. Search in the frontend for that exact product.

Expected result (*)

  1. Find that particular product without errors.

Actual result (*)

  1. Error report: {"0":"Warning: preg_match(): Unknown modifier '8' in /vendor/magento/module-search/Model/SynonymAnalyzer.php on line 96","1":"Can you commit to repository a folder dev/tests/static ? #1 preg_match() called at [vendor/magento/module-search/Model/SynonymAnalyzer.php:96]\n#2 Magento\Search\Model\SynonymAnalyzer->findInArray() called at [vendor/magento/module-search/Model/SynonymAnalyzer.php:71]

Additional info

  1. Create a product with below product name as mentioned earlier:
    image

  2. Create a Search Synonyms (Marketing -> Search Synonyms) and clear the cache as mentioned earlier:
    image

  3. Copy the entire product name and search in frontend.
    image

  4. Hit enter
    image

  5. Here is the message from the report:
    image

  6. Here is my configuration:
    image

Metadata

Metadata

Assignees

Labels

Component: ElasticsearchFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions