Elasticsearch & Lucene (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
What is the difference between `doc_values` and `fielddata`?
senior LevelelasticsearchAdvanced Internals
In Simple Words: Both are columnar data representations used for sorting and aggregations:
doc_values: On-disk columnar store created at index time for all non-analyzed fields. Read directly by the OS page cache; never causes JVM heap OOM.fielddata: In-memory columnar data structure loaded dynamically into JVM heap when aggregating on analyzedtextfields. High risk of memory exhaustion; disabled by default.