2 exception(s):
Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42000]: Syntax error or access violation: 1064 syntax error, unexpected $end, query was: SELECT `search_synonyms`.* FROM `search_synonyms` WHERE (MATCH (synonyms) AGAINST ('\\(' IN BOOLEAN MODE))
Exception #1 (PDOException): SQLSTATE[42000]: Syntax error or access violation: 1064 syntax error, unexpected $end
Hi @ron-jomashop. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.3-develop instance - upcoming 2.3.x release
For more details, please, review the Magento Contributor Assistant documentation.
@ron-jomashop do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
@magento give me 2.3-develop instance
Hi @ron-jomashop. Thank you for your request. I'm working on Magento 2.3-develop instance for you
Hi @ron-jomashop, here is your Magento instance.
Admin access: https://i-23159-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.
@magento give me 2.3.1 instance
Hi @ron-jomashop. Thank you for your request. I'm working on Magento 2.3.1 instance for you
Hi @ron-jomashop, here is your Magento instance.
Admin access: https://i-23159-2-3-1.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.
It is replicable with ElasticSearch enabled. I am using elasticsearch2 right now. Cannot reproduce on the instance because it doesn't have elasticsearch running in the background.
Hi @davidverholen. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[x] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Verify that the issue is reproducible on 2.2-develop branch. Details
- Add the comment @magento give me 2.2-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x
[ ] 6. Add label Issue: Confirmed once verification is complete.
[ ] 7. Make sure that automatic system confirms that report has been added to the backlog.
@ron-jomashop thanks for your report.
While I was able to reproduce the issue on a fresh 2.3.1 instance it seems to be fixed in the 2.3-develop branch. So it should already be fixed for 2.3.2
Since 2.2-develop does not support elasticsearch yet, this issue can be closed.
@magento-engcom-team give me 2.3.1 instance with elasticsearch
Hi @ron-jomashop. Thank you for your request. I'm working on Magento 2.3.1 instance for you
@magento give me 2.3-develop instance with elasticsearch
Hi @ron-jomashop. Thank you for your request. I'm working on Magento 2.3-develop instance for you
Hi @ron-jomashop, here is your Magento instance.
Admin access: https://i-23159-2-3-1.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.
I tested it with 2.3.x develop version and it also has this bug.
@ron-jomashop thanks for your report.
While I was able to reproduce the issue on a fresh 2.3.1 instance it seems to be fixed in the 2.3-develop branch. So it should already be fixed for 2.3.2
Since 2.2-develop does not support elasticsearch yet, this issue can be closed.
@davidverholen I have tested it with 2.3-develop and it is not working. Can you test it again? Thanks!
@ron-jomashop I tried again and could not reproduce it (while I was able to reproduce it directly on 2.3.1)
Steps I tried to reproduce:
/catalogsearch/result/?q=%28Environment:
php: 7.2.13
magento: 2.3-develop
es server docker config:
version: '2.2'
services:
es01:
image: elasticsearch:6.7.2
container_name: magento2.es
environment:
- node.name=magento2.es
- cluster.name=magento2.es
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata01:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- esnet
volumes:
esdata01:
driver: local
networks:
esnet:
Result:

@ron-jomashop I tried again and could not reproduce it (while I was able to reproduce it directly on 2.3.1)
Steps I tried to reproduce:
- Install vanilla 2.3-develop instance with sample data
- start elastic search server via docker-compose (see config below)
- log into admin, change search engine to elasticsearch 6.0+
- clear cache
- rebuild index
- open
/catalogsearch/result/?q=%28Environment:
php: 7.2.13
magento: 2.3-develop
es server docker config:version: '2.2' services: es01: image: elasticsearch:6.7.2 container_name: magento2.es environment: - node.name=magento2.es - cluster.name=magento2.es - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms512m -Xmx512m" ulimits: memlock: soft: -1 hard: -1 volumes: - esdata01:/usr/share/elasticsearch/data ports: - 9200:9200 networks: - esnet volumes: esdata01: driver: local networks: esnet:Result:
I am sorry but can you test it with ElasticSearch 2 again? I think it only occurs on older version of elasticsearch.
@ron-jomashop now also tested with elasticsearch2 and it also worked. Please make sure you are on a vanilla magento and on the latest 2.3-develop when trying to reproduce it
Alright. I will look into it. Thanks!
It seems like this commit fixed the issue
https://github.com/magento/magento2/commit/ec7015017b1e0c27c161fa62b1ead3a6367271e8
@davidverholen The Magento fix will only works on one parentheses. If you search "((((", it will break even on latest version of the Magento 2.
@ron-jomashop thx for investigating. Could you maybe update the preconditions then we can reopen it for confirmation (I'm currently not on my work machine and cannot reproduce it here)
Steps to reproduce (*)
Enable Elastic Search
append '/catalogsearch/result/?q=%28%28%28%28' to url. Ex: site.com/catalogsearch/result/?q=%28%28%28%28
The site will return a error.
The reason why Magento2.3.2 works is because it skips the search when it is less than 3 characters.
:white_check_mark: Confirmed by @davidverholen
Thank you for verifying the issue. Based on the provided information internal tickets MC-17777 were created
Issue Available: @davidverholen, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._
@ron-jomashop I'm noticing a similar bug on one of my sites as well. For search queries that are still working on your site, did you notice any inconsistent search results before upgrading to 2.3.1? For example, searching for a product name is returning results in 2.2.x, but not in 2.3.x. Trying to determine if my two issues are related or not. Thanks!