# ElasticSearch 6+ with Magento Commerce 2.3.2

**URL:** <https://discuss.elastic.co/t/elasticsearch-6-with-magento-commerce-2-3-2/200214>\
**Category:** Elasticsearch\
**Created:** [September 19, 2019, 1:49pm UTC](https://discuss.elastic.co/t/elasticsearch-6-with-magento-commerce-2-3-2/200214 "2019-09-19T13:49:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nilesht](https://avatars.discourse-cdn.com/v4/letter/n/977dab/32.png) [@nilesht](https://discuss.elastic.co/u/nilesht)\
**Post date:** [September 19, 2019, 1:49pm UTC](https://discuss.elastic.co/t/elasticsearch-6-with-magento-commerce-2-3-2/200214/1 "2019-09-19T13:49:21Z")

</div>

We have installed Elasticsearch on our Pre-production server.  
Environment we have:  
Elasticsearch installed Version: 6.8.3  
Magento Commerce version: 2.3.2  
SplitDB enabled  
Catalogsearch Fulltext indexing performed

Now we are seeing below error in exception log:  
Cannot search on field [sku] since it is not indexed.  
"index\_uuid":"kjokQil4SOStrqow3pCUmA","index":"magento2\_product\_1\_v59"}],"type":"search\_phase\_execution\_exception","reason":"all shards failed","phase":"query","grouped":true,"failed\_shards":[{"shard":0,"index":"magento2\_product\_1\_v59","node":"EHgFvfr7QbuI9Td\_Xipa1w","reason":{"type":"query\_shard\_exception","reason":"failed to create query:

$ **curl -XGET 'localhost:9200/\_cat/health?v&pretty'**  
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending\_tasks max\_task\_wait\_time active\_shards\_percent  
1568899757 13:29:17 elasticsearch yellow 1 1 70 70 0 0 70 0 - 50.0%

$ **curl localhost:9200/\_cluster/allocation/explain**  
{"index":"magento2\_product\_6\_v16","shard":3,"primary":false,"current\_state":"unassigned","unassigned\_info":{"reason":"CLUSTER\_RECOVERED","at":"2019-09-19T06:25:26.198Z","last\_allocation\_status":"no\_attempt"},"can\_allocate":"no","allocate\_explanation":"cannot allocate because allocation is not permitted to any of the nodes","node\_allocation\_decisions":[{"node\_id":"EHgFvfr7QbuI9Td\_Xipa1w","node\_name":"EHgFvfr","transport\_address":"10.0.0.88:9300","node\_attributes":{"ml.machine\_memory":"32151568384","xpack.installed":"true","ml.max\_open\_jobs":"20","ml.enabled":"true"},"node\_decision":"no","deciders":[{"decider":"same\_shard","decision":"NO","explanation":"the shard cannot be allocated to the same node on which a copy of the shard already exists [[magento2\_product\_6\_v16][3], node[EHgFvfr7QbuI9Td\_Xipa1w], [P], s[STARTED], a[id=E\_fEa6NPQ8um7zeN4lxsKg]]"}]}]}

Below are the detailed exception log:  
{"exception":"[object] (Elasticsearch\Common\Exceptions\BadRequest400Exception(code: 400): {"error":{"root\_cause":[{"type":"query\_shard\_exception","reason":"failed to create query: {  
\"bool\" : {  
\"must\" : [  
{  
\"terms\" : {  
\"visibility\" : [  
\"3\",  
\"4\"  
],  
\"boost\" : 1.0  
}  
}  
],  
\"should\" : [  
{  
\"match\" : {  
\"sku\" : {  
\"query\" : \"Custom PS4 Controller Skin\",  
\"operator\" : \"OR\",  
\"prefix\_length\" : 0,  
\"max\_expansions\" : 50,  
\"fuzzy\_transpositions\" : true,  
\"lenient\" : false,  
\"zero\_terms\_query\" : \"NONE\",  
\"auto\_generate\_synonyms\_phrase\_query\" : true,  
\"boost\" : 2.0  
}  
}  
},  
{  
\"match\" : {  
\"\_search\" : {  
\"query\" : \"Custom PS4 Controller Skin\",  
\"operator\" : \"OR\",  
\"prefix\_length\" : 0,  
\"max\_expansions\" : 50,  
\"fuzzy\_transpositions\" : true,  
\"lenient\" : false,  
\"zero\_terms\_query\" : \"NONE\",  
\"auto\_generate\_synonyms\_phrase\_query\" : true,  
\"boost\" : 2.0  
}  
}  
},  
{  
\"match\" : {  
\"name\" : {  
\"query\" : \"Custom PS4 Controller Skin\",  
\"operator\" : \"OR\",  
\"prefix\_length\" : 0,  
\"max\_expansions\" : 50,  
\"fuzzy\_transpositions\" : true,  
\"lenient\" : false,  
\"zero\_terms\_query\" : \"NONE\",  
\"auto\_generate\_synonyms\_phrase\_query\" : true,  
\"boost\" : 6.0  
}  
}  
}  
],  
\"adjust\_pure\_negative\" : true,  
\"minimum\_should\_match\" : \"1\",  
\"boost\" : 1.0  
}  
}","index\_uuid":"kjokQil4SOStrqow3pCUmA","index":"magento2\_product\_1\_v59"}],"type":"search\_phase\_execution\_exception","reason":"all shards failed","phase":"query","grouped":true,"failed\_shards":[{"shard":0,"index":"magento2\_product\_1\_v59","node":"EHgFvfr7QbuI9Td\_Xipa1w","reason":{"type":"query\_shard\_exception","reason":"failed to create query: {  
\"bool\" : {  
\"must\" : [  
{  
\"terms\" : {  
\"visibility\" : [  
\"3\",  
\"4\"  
],  
\"boost\" : 1.0  
}  
}  
],  
\"should\" : [  
{  
\"match\" : {  
\"sku\" : {  
\"query\" : \"Custom PS4 Controller Skin\",  
\"operator\" : \"OR\",  
\"prefix\_length\" : 0,  
\"max\_expansions\" : 50,  
\"fuzzy\_transpositions\" : true,  
\"lenient\" : false,  
\"zero\_terms\_query\" : \"NONE\",  
\"auto\_generate\_synonyms\_phrase\_query\" : true,  
\"boost\" : 2.0  
}  
}  
},  
{  
\"match\" : {  
\"\_search\" : {  
\"query\" : \"Custom PS4 Controller Skin\",  
\"operator\" : \"OR\",  
\"prefix\_length\" : 0,  
\"max\_expansions\" : 50,  
\"fuzzy\_transpositions\" : true,  
\"lenient\" : false,  
\"zero\_terms\_query\" : \"NONE\",  
\"auto\_generate\_synonyms\_phrase\_query\" : true,  
\"boost\" : 2.0  
}  
}  
},  
{  
\"match\" : {  
\"name\" : {  
\"query\" : \"Custom PS4 Controller Skin\",  
\"operator\" : \"OR\",  
\"prefix\_length\" : 0,  
\"max\_expansions\" : 50,  
\"fuzzy\_transpositions\" : true,  
\"lenient\" : false,  
\"zero\_terms\_query\" : \"NONE\",  
\"auto\_generate\_synonyms\_phrase\_query\" : true,  
\"boost\" : 6.0  
}  
}  
}  
],  
\"adjust\_pure\_negative\" : true,  
\"minimum\_should\_match\" : \"1\",  
\"boost\" : 1.0  
}  
}","index\_uuid":"kjokQil4SOStrqow3pCUmA","index":"magento2\_product\_1\_v59","caused\_by":{"type":"illegal\_argument\_exception","reason":"Cannot search on field [sku] since it is not indexed."}}}]},"status":400} at vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:636)"}

Could you please do advice for sorting this.?

Thanks,

---

<div class="post-metadata">

**Author:** ![nilesht](https://avatars.discourse-cdn.com/v4/letter/n/977dab/32.png) [@nilesht](https://discuss.elastic.co/u/nilesht)\
**Post date:** [September 25, 2019, 10:37am UTC](https://discuss.elastic.co/t/elasticsearch-6-with-magento-commerce-2-3-2/200214/2 "2019-09-25T10:37:13Z")

</div>

Any updates on this?

Just FYI, this issue replicate in Fresh Magento Commerce 2.3.2 with SplitDB too.  
Below link will guide for SplitDB setup:  
[https://devdocs.magento.com/guides/v2.3/config-guide/multi-master/multi-master\_masterdb.html](https://devdocs.magento.com/guides/v2.3/config-guide/multi-master/multi-master_masterdb.html)

Please do reply.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 23, 2019, 10:37am UTC](https://discuss.elastic.co/t/elasticsearch-6-with-magento-commerce-2-3-2/200214/3 "2019-10-23T10:37:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
