Skip to main content
InterviewHubPRO
Section Overview
Q26

Question 26 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

52%
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 analyzed text fields. High risk of memory exhaustion; disabled by default.