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?
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"
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With