Elasticsearch template doesnt set doc_value attribute for index mappings


(Lokhande) #1

Hi,

Based on certain suggestion for elastic search performance tunning, we started using doc_value as true for several fields in our index mapping. This attribute appears in index mappings when we create the index with mappings separately. However when we use the same mapping template, the index creation does not set the doc value attribute as per the template in the mappings. Does doc_value attribute needs to be set in different manner while using templates?

Thanks.


(Mark Walkom) #2

What version are you on?


(Lokhande) #3

Its 2.1.1 version.


(Mark Walkom) #4

2.X automatically does doc_values for non_analyzed fields.
There's a flag you can pass the mapping API to get these included when you query it, but I can't find it at the moment.


(Lokhande) #5

Thanks Mark. That really helps.


(system) #6