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

**URL:** <https://discuss.elastic.co/t/elasticsearch-and-magento-2-4-1-no-mapping-found-for-position-category/253891>\
**Category:** Elasticsearch\
**Created:** [October 31, 2020, 7:43am UTC](https://discuss.elastic.co/t/elasticsearch-and-magento-2-4-1-no-mapping-found-for-position-category/253891 "2020-10-31T07:43:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dani1](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@dani1](https://discuss.elastic.co/u/dani1)\
**Post date:** [October 31, 2020, 7:43am UTC](https://discuss.elastic.co/t/elasticsearch-and-magento-2-4-1-no-mapping-found-for-position-category/253891/1 "2020-10-31T07:43:32Z")

</div>

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

```auto
[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)"} []

```

---

<div class="post-metadata">

**Author:** ![dani1](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@dani1](https://discuss.elastic.co/u/dani1)\
**Post date:** [November 14, 2020, 7:43pm UTC](https://discuss.elastic.co/t/elasticsearch-and-magento-2-4-1-no-mapping-found-for-position-category/253891/2 "2020-11-14T19:43:43Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![lapostolovski](https://avatars.discourse-cdn.com/v4/letter/l/46a35a/32.png) [@lapostolovski](https://discuss.elastic.co/u/lapostolovski)\
**Post date:** [December 10, 2020, 2:40pm UTC](https://discuss.elastic.co/t/elasticsearch-and-magento-2-4-1-no-mapping-found-for-position-category/253891/3 "2020-12-10T14:40:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![dani1](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@dani1](https://discuss.elastic.co/u/dani1)\
**Post date:** [December 10, 2020, 9:04pm UTC](https://discuss.elastic.co/t/elasticsearch-and-magento-2-4-1-no-mapping-found-for-position-category/253891/4 "2020-12-10T21:04:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Herecomes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/herecomes/32/81406_2.png) [@Herecomes](https://discuss.elastic.co/u/Herecomes)\
**Post date:** [December 25, 2020, 3:59pm UTC](https://discuss.elastic.co/t/elasticsearch-and-magento-2-4-1-no-mapping-found-for-position-category/253891/5 "2020-12-25T15:59:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![trotlix](https://avatars.discourse-cdn.com/v4/letter/t/c6cbf5/32.png) [@trotlix](https://discuss.elastic.co/u/trotlix)\
**Post date:** [December 29, 2020, 11:59am UTC](https://discuss.elastic.co/t/elasticsearch-and-magento-2-4-1-no-mapping-found-for-position-category/253891/6 "2020-12-29T11:59:01Z")

</div>

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. Viktor ![screen](https://us1.discourse-cdn.com/elastic/original/3X/e/d/ed773fd2466cae836fa286326abe8cc3ebbce5e0.jpeg)

---

<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:** [January 26, 2021, 11:59am UTC](https://discuss.elastic.co/t/elasticsearch-and-magento-2-4-1-no-mapping-found-for-position-category/253891/7 "2021-01-26T11:59:05Z")

</div>

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