Bax
Bax

Reputation: 4506

What is the difference between enabled : false and index : 'no' in elasticsearch?

When mapping fields in elaticsearch, what's the difference between setting

enabled : false

for the field vs setting

index : 'no'

?

Upvotes: 24

Views: 7276

Answers (1)

punund
punund

Reputation: 4421

As I understand, index: no is applicable to core types only, whereas enabled: false is defined for object types and ElasticSearch specific fields such as _index, _all, ...

From the documentation:

The enabled setting, which can be applied only to the mapping type and to object fields. It causes Elasticsearch to skip parsing of the contents of the field entirely.


Example of enabled usage (YAML format):

    ---
    ...
    _all:
          enabled: false
    ...

Upvotes: 18

Related Questions