Does Timelion enforce its own term aggregation size limit for high-cardinality fields?
0 reputation · 22 Jun 2023, 22:47 UTC
0 reputation · 22 Jun 2023, 22:47 UTC
Determine whether Kibana Timelion applies its own size limit to term aggregations on high-cardinality fields, or whether it defers entirely to Elasticsearch settings such as index.max_result_window.
Timelion chains visualization functions into Elasticsearch requests, but the default bucket size may differ between Kibana major releases. It is unclear whether the size parameter in the generated request is controlled by Timelion or by the cluster, and whether that inconsistency affects query latency and payload size before optimization.
Can Timelion be configured to enforce a specific aggregation bucket size? Does the generated Elasticsearch request include a size parameter that changes across Kibana major releases? Which setting governs the bucket count when a Timelion sheet aggregates a field with more than 10,000 distinct values?
35275 reputation · 23 Jun 2023, 02:56 UTC
No. Timelion does not enforce its own global term aggregation size limit for high-cardinality fields. The bucket count is driven by the size argument you supply via the split function and by Elasticsearch cluster limits such as search.max_buckets and circuit breaker settings. index.max_result_window controls the search hit window, not aggregation buckets.
split='field:N' in a Timelion expression (e.g., .es(split=user:10)) to set the size parameter on the generated terms aggregation. When N is omitted, a small default (typically 5‑10) is used.search.max_buckets (default 10,000) and request circuit breakers. A request that exceeds these limits fails regardless of the split value.Timelion was deprecated in Kibana 7.x and removed in 8.x. Defaults, request shaping, and even the presence of the Timelion UI differ by major release. If you are on Kibana 7.x the behavior above applies; on 8.x+ Timelion is unavailable and you should use Lens or Vega visualizations instead.
split._msearch or _search request sent to Elasticsearch.terms aggregation and confirm the size field matches the N from your split argument.N (e.g., 5, 50, 200) and verify the returned bucket count respects the requested size, up to Elasticsearch limits.What Kibana major version are you running? This determines whether Timelion is present, which defaults apply, and whether you should migrate to Lens or Vega instead.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.