-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Elasticsearch version (bin/elasticsearch --version): 6.1.3
Plugins installed: [] X-Pack Basic License
JVM version (java -version): 1.8.0_92
OS version (uname -a if on a Unix-like system): Ubuntu 16.04 LTS
Description of the problem including expected versus actual behavior:
I try to tune my Elasticsearch for indexing speed so I have disabled _field_names in template:
"index_patterns": [ "logs*" ], "aliases": {}, "mappings": { "doc": { "_field_names": { "enabled": false }, "dynamic_templates": [ { "strings": { "mapping": { "type": "keyword" }, "match_mapping_type": "string" } } ],
I see settings about _field_names in index mapping:
{ "logs_www-2018.05.25": { "mappings": { "doc": { "_field_names": { "enabled": false }, "dynamic_templates": [ { "strings": { "mapping": { "type": "keyword" }, "match_mapping_type": "string" } } ], "properties": { "@timestamp": { "type": "date" }, "level": { "type": "keyword" }, "message": { "analyzer": "logster", "type": "text", "norms": false }, "tag": { "type": "keyword", "ignore_above": 64 } }, "_source": { "excludes": [ "debug" ] } } } } }
But I'm still able to run exists queries on that index:
{ "query": { "exists" : { "field" : "level" } } }
So I guess _field_names are still active and add some overhead to indexing speed.
Steps to reproduce:
- Create template with disabled _field_names: https://www.elastic.co/guide/en/elasticsearch/reference/master/mapping-field-names-field.html
- Create index with proper pattern.
- Run exists query on any existing field.