Elasticsearch and Magento 2.4.1 "No mapping found for position category"

Hello there,
I'm facing this issue with Elasticsearch 7.6.2 with Magento 2.4. Anyone have an idea?

[2020-10-31 07:34:29] main.CRITICAL: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [position_category_8] in order to sort on","index_uuid":"LkCXUOMsSE-AveQcr24LnA","index":"magento2_product_1_v1386"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v1386","node":"GCg17KQLQy2vaPPfo1tuTg","reason":{"type":"query_shard_exception","reason":"No mapping found for [position_category_8] in order to sort on","index_uuid":"LkCXUOMsSE-AveQcr24LnA","index":"magento2_product_1_v1386"}}]},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [position_category_8] in order to sort on\",\"index_uuid\":\"LkCXUOMsSE-AveQcr24LnA\",\"index\":\"magento2_product_1_v1386\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento2_product_1_v1386\",\"node\":\"GCg17KQLQy2vaPPfo1tuTg\",\"reason\":{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [position_category_8] in order to sort on\",\"index_uuid\":\"LkCXUOMsSE-AveQcr24LnA\",\"index\":\"magento2_product_1_v1386\"}}]},\"status\":400} at /var/www/vhosts/mywebsite.com/httpdocs/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []

The issue was running multiple Magento instances on the same server. You need to have a different index names for each website. You can specify Magento index name in Magento backend (configuration/catalog)

I am running in completely same issue. I cant see option in configuration/catalog where i can set different index name.
Can you specify exactly what need to be done to fix this issue?
Thank you!

Go to STORES > CONFIGURATION > CATALOG > CATALOG > CATALOG SEARCH > Elasticsearch Index Prefix. Set a different prefix for each store, any random one for each. Reindex and flush cache on each store.

Hello, but i see that this field is global https://prnt.sc/w9tkqi

Hello,

could you please describe how to change prefix for each store? The field "Elasticsearch Index Prefix" is available only when the Scope is "default config" - sreen attached.

When I switch to Store (I have to two) the field is not available at all.

Please help. Thank you. Viktorscreen

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