I've installed the mapper-size plugin on my Elasticsearch 2.2.1 cluster, restarted all the nodes, and have attempted to follow the instructions to enable it on an existing index (which might be the problem).
Here's what the docs say to use to enable the _size field:
PUT my_index
{
"mappings": {
"my_type": {
"_size": {
"enabled": true
}
}
}
}
Here's the query I'm issuing, modeled on the one above:
PUT logstash-2016.03.31
{
"mappings": {
"log": {
"_size": {
"enabled": true
}
}
}
}
Which give me:
{
"error": {
"root_cause": [
{
"type": "index_already_exists_exception",
"reason": "already exists",
"index": "logstash-2016.03.31"
}
],
"type": "index_already_exists_exception",
"reason": "already exists",
"index": "logstash-2016.03.31"
},
"status": 400
}
So, either I'm wrong or the docs are. Would appreciate someone in the know telling me which, and how to fix it, if possible.
A related question: now that I've installed the size mapper, assuming I can't retroactively apply this field to my existing indexes, will new auto-generated indexes automatically get the _size field, or do I have to do something else to enable it for all indexes? Still feel like a noob to Elasticsearch, probably always will. Appreciate the help.