We use ES 1.4.4 . We configured some fields to be "docs_value", however we still see that the field data cache of these fields is growing when we check it with :
/_stats/fielddata?fields=*&pretty
So for instance I add in the template this definition:
"itemUrl": {
"index": "not_analyzed",
"doc_values": true,
"type": "string"
}
Also, when you changed your mapping, did you re-index your data after applying the mapping? In order for doc values to take effect, every doc that fits the mapping has to be indexed after the mapping has been applied.
Hi Harlin.
Thank you for the example
No. I didn't re-index my data. I'm using daily indices. So from what I understood from the docs, fields that will be indexed after applying the mapping, will be stored as doc_values on the disk.
I don't mind that fields that were indexed before the change are not stored as doc_values on the disk (because in time everything will become doc_values because I will archive the old indices).
I also read that after segment merge, the changes will take effect on old indices.
Should I re-index anyway ?
Thank you for the comprehensive response !
Another small question. Can I define the doc_values in dynamic_template if I want that all the fields from certain type will use it ?
If for instance I define:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.