Why do aggregation queries on keyword field produce fieldata in JVM HEAP?

Hi all,

Does anyone know why making aggregations on keyword fields of an index produce fieldata cache in JVM HEAP?
Per the docs on elastic official site, most fields except text will use doc_values to support aggregations. So it should not produce fielddata cache in JVM heap when making aggregations on keyword field ?

https://www.elastic.co/guide/en/elasticsearch/reference/6.3/fielddata.html

Thanks!

Which version of elasticsearch are you using? Can you show how your query and mapping look like? Can you check which fields are getting the fielddata associated with them by running:

GET /_nodes/stats/indices/fielddata?fields=*

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.