Hi, everyone. I am confuse about these PUT mapping APIs in this Guide Document, and need some help
![]()
The Request APIs are:
PUT /<index>/_mapping
PUT /_mapping
About the path parameter <index>, it says that:
To update the mapping of all indices, omit this parameter or use a value of
_all.
But when I tryed to do this:
PUT /_mapping
{
"properties": {
"test": {
"type": "text"
}
}
}
I got a 405 error:
"error": "Incorrect HTTP method for uri [/_mapping?pretty] and method [PUT], allowed: [GET]",
"status": 405
So, is there anything wrong about the doc or I misunderstand the meaning?why the PUT /_mapping endpoint is not supported but the doc give this API? Can we truely omit the <index> parameter, just use PUT /_mapping to update the mapping of all indices?
Hope there is an answer ASAP! Thanks!