Skip to content

ElasticSearch breaks with / #28286

Closed
@rafaelstz

Description

@rafaelstz

Preconditions (*)

  1. ElasticSearch 6
  2. Magento Commerce 2.3.1

Steps to reproduce (*)

  1. Search "bois trait/"

Expected result (*)

  1. Return results
  2. Don't break

Actual result (*)

  1. Break the page
  2. Logs say:

New Relic

Zend_Db_Statement_Exception: Noticed exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 syntax error, unexpected $end, query was: SELECT `search_synonyms`.* FROM `search_synonyms` WHERE (MATCH (synonyms) AGAINST ('mono<' IN BOOLEAN MODE))' in /app/ndhksfk328pps/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110

Magento Report

{"0":"Warning: preg_match(): Unknown modifier ',' in \/app\/mdhksik627pps\/vendor\/magento\/module-search\/Model\/SynonymAnalyzer.php on line 96","1":"#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]\n#3 Magento\\Search\\Model\\SynonymAnalyzer->getSynonymsForPhrase() called at [vendor\/magento\/module-search\/Adapter\/Query\/Preprocessor\/Synonyms.php:34]\n#4 Magento\\Search\\Adapter\\Query\\Preprocessor\\Synonyms->process() called at [vendor\/magento\/module-elasticsearch\/SearchAdapter\/Query\/Builder\/Match.php:77]\n#5 Magento\\Elasticsearch\\SearchAdapter\\Query\\Builder\\Match->prepareQuery() called at [vendor\/magento\/module-elasticsearch\/SearchAdapter\/Query\/Builder\/Match.php:50]\n#6 Magento\\Elasticsearch\\SearchAdapter\\Query\\Builder\\Match->build() called at [vendor\/magento\/module-elasticsearch\/Elasticsearch5\/SearchAdapter\/Mapper.php:105]\n#7 Magento\\Elasticsearch\\Elasticsearch5\\SearchAdapter\\Mapper->processQuery() called at [vendor\/magento\/module-elasticsearch\/Elasticsearch5\/SearchAdapter\/Mapper.php:171]\n#8 Magento\\Elasticsearch\\Elasticsearch5\\SearchAdapter\\Mapper->processBoolQueryCondition() called at [vendor\/magento\/module-elasticsearch\/Elasticsearch5\/SearchAdapter\/Mapper.php:144]\n#9 Magento\\Elasticsearch\\Elasticsearch5\\SearchAdapter\\Mapper->processBoolQuery() called at [vendor\/magento\/module-elasticsearch\/Elasticsearch5\/SearchAdapter\/Mapper.php:110]\n#10 Magento\\Elasticsearch\\Elasticsearch5\\SearchAdapter\\Mapper->processQuery() called at [vendor\/magento\/module-elasticsearch\/Elasticsearch5\/SearchAdapter\/Mapper.php:72]\n#11 Magento\\Elasticsearch\\Elasticsearch5\\SearchAdapter\\Mapper->buildQuery() called at [vendor\/magento\/module-elasticsearch\/Elasticsearch5\/SearchAdapter\/Adapter.php:112]\n#12 Magento\\Elasticsearch\\Elasticsearch5\\SearchAdapter\\Adapter->query() called at [vendor\/magento\/module-search\/Model\/SearchEngine.php:42]\n#13 Magento\\Search\\Model\\SearchEngine->search() called at [vendor\/magento\/framework\/Search\/Search.php:72]\n#14 Magento\\Framework\\Search\\Search->search() called at [vendor\/magento\/module-catalog-search\/Model\/ResourceModel\/Fulltext\/Collection.php:359]\n#15 Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection->_renderFiltersBefore() called at [vendor\/magento\/framework\/Data\/Collection\/AbstractDb.php:342]\n#16 Magento\\Framework\\Data\\Collection\\AbstractDb->_renderFilters() called at [vendor\/magento\/module-catalog-search\/Model\/ResourceModel\/Fulltext\/Collection.php:410]\n#17 Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection->_renderFilters() called at [vendor\/magento\/module-eav\/Model\/Entity\/Collection\/AbstractCollection.php:920]\n#18 Magento\\Eav\\Model\\Entity\\Collection\\AbstractCollection->load() called at [vendor\/magento\/module-catalog\/Model\/ResourceModel\/Product\/Collection.php:799]\n#19 Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection->load() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#20 Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#21 Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#22 Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/CatalogSearch\/Model\/ResourceModel\/Fulltext\/Collection\/Interceptor.php:26]\n#23 Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection\\Interceptor->load() called at [vendor\/magento\/module-review\/Observer\/CatalogBlockProductCollectionBeforeToHtmlObserver.php:38]\n#24 Magento\\Review\\Observer\\CatalogBlockProductCollectionBeforeToHtmlObserver->execute() called at [vendor\/magento\/framework\/Event\/Invoker\/InvokerDefault.php:72]\n#25 Magento\\Framework\\Event\\Invoker\\InvokerDefault->_callObserverMethod() called at [vendor\/magento\/framework\/Event\/Invoker\/InvokerDefault.php:60]\n#26 Magento\\Framework\\Event\\Invoker\\InvokerDefault->dispatch() called at [vendor\/magento\/module-staging\/Model\/Event\/Manager.php:97]\n#27 Magento\\Staging\\Model\\Event\\Manager->dispatch() called at [generated\/code\/Magento\/Staging\/Model\/Event\/Manager\/Proxy.php:95]\n#28 Magento\\Staging\\Model\\Event\\Manager\\Proxy->dispatch() called at [vendor\/magento\/module-catalog\/Block\/Product\/ListProduct.php:471]\n#29 Magento\\Catalog\\Block\\Product\\ListProduct->initializeProductCollection() called at [vendor\/magento\/module-catalog\/Block\/Product\/ListProduct.php:116]\n#30 Magento\\Catalog\\Block\\Product\\ListProduct->_getProductCollection() called at [vendor\/magento\/module-catalog\/Block\/Product\/ListProduct.php:348]\n#31 Magento\\Catalog\\Block\\Product\\ListProduct->getIdentities() called at [vendor\/magento\/module-page-cache\/Model\/Layout\/LayoutPlugin.php:71]\n#32 Magento\\PageCache\\Model\\Layout\\LayoutPlugin->afterGetOutput() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:146]\n#33 Magento\\Framework\\View\\Layout\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#34 Magento\\Framework\\View\\Layout\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/View\/Layout\/Interceptor.php:39]\n#35 Magento\\Framework\\View\\Layout\\Interceptor->getOutput() called at [vendor\/magento\/framework\/View\/Result\/Page.php:258]\n#36 Magento\\Framework\\View\\Result\\Page->render() called at [vendor\/magento\/framework\/View\/Result\/Layout.php:171]\n#37 Magento\\Framework\\View\\Result\\Layout->renderResult() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#38 Magento\\Framework\\View\\Result\\Page\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#39 Magento\\Framework\\View\\Result\\Page\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#40 Magento\\Framework\\View\\Result\\Page\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/View\/Result\/Page\/Interceptor.php:26]\n#41 Magento\\Framework\\View\\Result\\Page\\Interceptor->renderResult() called at [vendor\/magento\/framework\/App\/View.php:221]\n#42 Magento\\Framework\\App\\View->renderLayout() called at [vendor\/magento\/module-catalog-search\/Controller\/Result\/Index.php:168]\n#43 Magento\\CatalogSearch\\Controller\\Result\\Index->getNotCacheableResult() called at [vendor\/magento\/module-catalog-search\/Controller\/Result\/Index.php:110]\n#44 Magento\\CatalogSearch\\Controller\\Result\\Index->execute() called at [vendor\/magento\/framework\/App\/Action\/Action.php:108]\n#45 Magento\\Framework\\App\\Action\\Action->dispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#46 Magento\\CatalogSearch\\Controller\\Result\\Index\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#47 Magento\\CatalogSearch\\Controller\\Result\\Index\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-customer-segment\/Model\/App\/Action\/ContextPlugin.php:81]\n#48 Magento\\CustomerSegment\\Model\\App\\Action\\ContextPlugin->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#49 Magento\\CatalogSearch\\Controller\\Result\\Index\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-company\/Plugin\/Framework\/App\/Action\/AbstractActionPlugin.php:65]\n#50 Magento\\Company\\Plugin\\Framework\\App\\Action\\AbstractActionPlugin->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#51 Magento\\CatalogSearch\\Controller\\Result\\Index\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#52 Magento\\CatalogSearch\\Controller\\Result\\Index\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/CatalogSearch\/Controller\/Result\/Index\/Interceptor.php:26]\n#53 Magento\\CatalogSearch\\Controller\\Result\\Index\\Interceptor->dispatch() called at [vendor\/magento\/framework\/App\/FrontController.php:159]\n#54 Magento\\Framework\\App\\FrontController->processRequest() called at [vendor\/magento\/framework\/App\/FrontController.php:99]\n#55 Magento\\Framework\\App\\FrontController->dispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#56 Magento\\Framework\\App\\FrontController\\Interceptor->___callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#57 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-store\/App\/FrontController\/Plugin\/RequestPreprocessor.php:94]\n#58 Magento\\Store\\App\\FrontController\\Plugin\\RequestPreprocessor->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#59 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/fastly\/magento2\/Model\/FrontControllerPlugin.php:120]\n#60 Fastly\\Cdn\\Model\\FrontControllerPlugin->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#61 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/module-page-cache\/Model\/App\/FrontController\/BuiltinPlugin.php:69]\n#62 Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#63 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/amasty\/aminvisiblecaptcha\/Plugin\/Predispatch.php:112]\n#64 Amasty\\InvisibleCaptcha\\Plugin\\Predispatch->aroundDispatch() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:135]\n#65 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#66 Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php:26]\n#67 Magento\\Framework\\App\\FrontController\\Interceptor->dispatch() called at [vendor\/magento\/framework\/App\/Http.php:116]\n#68 Magento\\Framework\\App\\Http->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:258]\n#69 Magento\\Framework\\App\\Bootstrap->run() called at [pub\/index.php:40]\n","url":"\/https\/github.com/fr\/catalogsearch\/result\/?q=bois+trait%2F","script_name":"\/index.php","report_id":"bc0acf90dff89e167c29e7d0b9214c6d8ec07d95724b1f0fcb5043995e713154"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Format is validGate 1 Passed. Automatic verification of issue format passedReported on 2.3.1Indicates original Magento version for the Issue report.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions