# Magento 2 + Elasticsearch indexing error

**URL:** <https://discuss.elastic.co/t/magento-2-elasticsearch-indexing-error/355466>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [March 15, 2024, 10:02am UTC](https://discuss.elastic.co/t/magento-2-elasticsearch-indexing-error/355466 "2024-03-15T10:02:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexglvr](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@alexglvr](https://discuss.elastic.co/u/alexglvr)\
**Post date:** [March 15, 2024, 10:02am UTC](https://discuss.elastic.co/t/magento-2-elasticsearch-indexing-error/355466/1 "2024-03-15T10:02:49Z")

</div>

Hello,

My Magento 2 website (2.4.6) was working with Elasticsearch until I installed  
a payment module from Adobe and its dependencies:

I now have an error while indexing :

```auto
Catalog Search index process error during indexation process:
{"error":"no handler found for uri [/magento2_product_1_v23/document/_mapping?include_type_name=true] and method [PUT]"}

```

I checked Elasticsearch files and no updates seems to have been done, so current version was the one that was working i.e. 8.11.4

```auto
curl localhost:9200
{
  "name" : "vps-f8865e14",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "jVK-pJXXRxW15PpCAgjRug",
  "version" : {
    "number" : "8.11.4",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "da06c53fd49b7e676ccf8a32d6655c5155c16d81",
    "build_date" : "2024-01-08T10:05:08.438562403Z",
    "build_snapshot" : false,
    "lucene_version" : "9.8.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}

```

Thank you for your help !

Regards  
Alex

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 15, 2024, 8:19pm UTC](https://discuss.elastic.co/t/magento-2-elasticsearch-indexing-error/355466/2 "2024-03-15T20:19:30Z")

</div>

> [@alexglvr](#):
>
> `/magento2_product_1_v23/document/_mapping`

This URL is not supported in Elasticsearch 8.x.

> [@alexglvr](#):
>
> My Magento 2 website (2.4.6) was working with Elasticsearch until I installed  
> a payment module from Adobe and its dependencies:

I guess this updated Elasticsearch?

You need to upgrade your magento module I think and find one which is compatible with Elasticsearch 8.x.

---

<div class="post-metadata">

**Author:** ![alexglvr](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@alexglvr](https://discuss.elastic.co/u/alexglvr)\
**Post date:** [March 16, 2024, 6:54am UTC](https://discuss.elastic.co/t/magento-2-elasticsearch-indexing-error/355466/3 "2024-03-16T06:54:58Z")

</div>

Hello David,

Thank you for your answer.

No, it does not update ES to 8.11. It was already 8.11.

Effectively, something in the module does not support ES 8.x  
The module provider managed to make it work with ES 7.9.3.

I read everywhere it was not possible to downgrade ES...

Is there a solution to uninstall ES 8 and install ES 7 without having to reinstall the all server?

Thank you again

Regards

Alex

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 16, 2024, 9:05am UTC](https://discuss.elastic.co/t/magento-2-elasticsearch-indexing-error/355466/4 "2024-03-16T09:05:58Z")

</div>

> [@alexglvr](#):
>
> No, it does not update ES to 8.11. It was already 8.11.

So if Elasticsearch was not updated, the magento module or the magento settings were updated.

You need to find what changed if it's not Elasticsearch.

You cannot downgrade and anyway that'd probably not change the behavior as the problem is elsewhere.

I'm wondering if you had a proxy like nginx previously or something like that which was rewriting the url.

Could you share the full logs of elasticsearch as well?

---

<div class="post-metadata">

**Author:** ![alexglvr](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@alexglvr](https://discuss.elastic.co/u/alexglvr)\
**Post date:** [March 16, 2024, 5:33pm UTC](https://discuss.elastic.co/t/magento-2-elasticsearch-indexing-error/355466/5 "2024-03-16T17:33:01Z")

</div>

> So if Elasticsearch was not updated, the magento module or the magento settings were updated.
> 
> You need to find what changed if it's not Elasticsearch.

The module was installed (it was not present before), with all its dependencies.

> You cannot downgrade and anyway that'd probably not change the behavior as the problem is elsewhere.

Just to understand : If I desinstall ES 8 completely, including ES Config files and Data, Why will I not be able to resintall ES 7.9.3? I could after recreates the data by launching the magento indexer, no? What do I miss? (sorry if the question is stupid, I am new to ES...)

NB: The module vendor tested successfully Magento 2.4.6 + ES 7.9.3 + the module last version.

> Could you share the full logs of elasticsearch as well?

 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/6/3/63f600a9228cb876a6f62b0fdc51d5579b7285ed.jpeg)

(Issue started at around 19:30 the 24-03-14, after module installation)

Thank again for your help

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [March 16, 2024, 5:44pm UTC](https://discuss.elastic.co/t/magento-2-elasticsearch-indexing-error/355466/6 "2024-03-16T17:44:04Z")

</div>

> [@alexglvr](#):
>
> Just to understand : If I desinstall ES 8 completely, including ES Config files and Data, Why will I not be able to resintall ES 7.9.3?

You can do this, but this is not a downgrade, it is a new install.

What you cannot do is downgrade a current installation of Elasticsearch to a lower version, this does not work, but if you remove the data and settings, then you are in fact removing elasticsearch and installing a new and fresh one.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 17, 2024, 12:31pm UTC](https://discuss.elastic.co/t/magento-2-elasticsearch-indexing-error/355466/7 "2024-03-17T12:31:33Z")

</div>

Do you have a setting in Magento where you can define the document type to be `_doc` instead of `document`?

From what I can read in the Magento 2.4.6 doc, it's compatible with Elasticsearch 8.  
But I believe that you should better ask the Magento community for this.

I looked at the logs and there's nothing weird IMO.  
Just that the node seems to be restarted everyday and the catalog rebuilt everyday.

---

<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:** [April 14, 2024, 12:31pm UTC](https://discuss.elastic.co/t/magento-2-elasticsearch-indexing-error/355466/8 "2024-04-14T12:31:46Z")

</div>

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