I am looking at examples of indexes of the same type on ElasticSearch 5.6 in preparation for deleting matching types. In particular, I run the first example on the ElasticSearch page about deleting types , in a new cluster running locally in Docker, using the docker.elastic.co/elasticsearch/elasticsearch:5.6.5
image
Running the first example from section I related to:
PUT localhost:9200/users
{
"settings": {
"index.mapping.single_type": true
},
"mappings": {
"_doc": {
"properties": {
"name": {
"type": "text"
},
"user_name": {
"type": "keyword"
},
"email": {
"type": "keyword"
}
}
}
}
}
I get the following error:
{
"error": {
"root_cause": [
{
"type": "invalid_type_name_exception",
"reason": "mapping type name [_doc] can't start with '_'"
}
],
"type": "invalid_type_name_exception",
"reason": "mapping type name [_doc] can't start with '_'"
},
"status": 400
}
I understand that fields with leading underscores in the name are usually considered reserved for internal ES elements; but I assumed that it _doc
would be considered as a special case, starting with the version 5.6
, as the related guide mentions:
, 6.x, . , . _doc, API- , 7.0
- , , ?