Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No handler found for URI (elasticsearch)

Im trying to add type to index like this:

PUT /catalog/_mapping/product
    {
      "properties": {
        "name": {
          "type":"text"
        }
      }
    }

In answer I get an error:

{
  "error" : "no handler found for uri [/catalog/_mapping/product?pretty=true] and method [PUT]"
}

The same situation in CURL. How I can fix it?

like image 581
rokoman13 Avatar asked Nov 02 '25 12:11

rokoman13


1 Answers

I assume you use ElasticSearch 8.x version.

From ElasticSearch 8.x version, only _doc is supported and it is just an endpoint name, not a document type. So try with:

PUT /catalog/_doc/product
{
  "properties": {
    "name": {
      "type":"text"
    }
  }
}
like image 61
Rubén Aguado Avatar answered Nov 05 '25 05:11

Rubén Aguado