All Questions
Elasticsearch hard

You are aggregating on a field with millions of unique values (e.g., UserID) and nesting sub-aggregations within it. Which setting prevents 'Bucket Explosion'?

  1. A Changing the collection mode to `breadth_first`. This prunes the tree by identifying the 'top' buckets before calculating the sub-aggregations for only those winners.
  2. B Disabling the `_source` field for the duration of the query.
  3. C Increasing the `index.mapping.total_fields.limit` to 5000.
  4. D Using a `script_score` to manually calculate the bucket weights.

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

Get the app

Related questions