0

Geeing error while execute index command

php bin/magento indexer:reindex

{"error":"no handler found for uri [/magento2_product_1_v2/document/_mapping? include_type_name=true] and method [PUT]"}

please guide thank you!.

1
  • 2
    Now it's Fixed. Because of the elasticsearch version 8.x I was face this issue now it's fixed after changing the version of 7.16.1. below url help me alote. stackoverflow.com/questions/58656747/…
    – Vivek
    Commented Apr 17, 2022 at 20:15

4 Answers 4

0

Run this command for check elastic search version

Check your Elasticsearch Server Hostname and Elasticsearch Server Port before run command

curl -XGET 'http://localhost:9200'

You must have magento supported elastic version

0

To use Elasticsearch with Magento 2.4.6-x I followed this post: Magento 2.4.6 Install with Elasticsearch

Additionally I needed to update my Elasticsearch configuration and set

indices.id_field_data.enabled: true

If you run ES in a docker container (with docker-compose) you can set this via env vars. Here is mine for reference:

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.5.3
    container_name: elasticsearch
    restart: always
    environment:
      # Needed for Magento 2.4.6 to find products and show them in the shop.
      - indices.id_field_data.enabled=true
0

I had same issue with Magento:2.4.6-p3, PHP:8.1, OpenSearch:2.5

My solution:

cd <magento_dir>
composer2.6.6 -vvv opensearch-project/opensearch-php --update-with-all-dependencies
composer2.6.6 update

php bin/magento setup:upgrade && \
php bin/magento setup:di:compile && \
php bin/magento setup:static-content:deploy -f -s standard && \
php bin/magento cache:flush && \
php bin/magento indexer:reindex

chown -R :www-data . && \
rm -rf var/cache/* && \
rm -rf var/page_cache/* && \
rm -rf generated/code/* && \
rm -rf var/log/* && \
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && \
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +

NB: create a backup of your working composer.* files

0

I encountered a similar issue while running Opensearch 2.5-1.

Switching to Opensearch 1.2-0 resolved the problem.

https://community.magento.com/t5/Installing-Magento-2-x/OpenSearch-Version/m-p/515464/highlight/true#M11406

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.