Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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'

?

like image 891
Bax Avatar asked Dec 18 '13 15:12

Bax


1 Answers

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
...
like image 52
punund Avatar answered Sep 18 '22 08:09

punund