All Questions
Elasticsearch hard

When performing aggregations on high-cardinality `keyword` fields, Elasticsearch builds 'Global Ordinals'. Why are these computed eagerly or lazily, and what is their memory structure?

  1. A They are 128-bit hashes that replace the `_id` field to save disk space.
  2. B They are a cluster-wide lookup map that translates unique string terms into small, contiguous integers (ordinals). This allows aggregation buckets to be handled as fast numeric arrays rather than slow string-comparison maps.
  3. C They are Bloom filters used to skip shards that definitely don't contain the requested terms.
  4. D They are a subset of the transaction log used for auditing search history.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions