Skip to content

Disabling _field_names don't work? #30862

@nfsec

Description

@nfsec

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:

  1. Create template with disabled _field_names: https://www.elastic.co/guide/en/elasticsearch/reference/master/mapping-field-names-field.html
  2. Create index with proper pattern.
  3. Run exists query on any existing field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search Foundations/MappingIndex mappings, including merging and defining field typesTeam:Search FoundationsMeta label for the Search Foundations team in Elasticsearch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions