Skip to content

Fix a bug in significant_terms (#127975)#127993

Merged
elasticsearchmachine merged 1 commit intoelastic:8.18from
nik9000:sig_terms_big_oob_8_18
May 9, 2025
Merged

Fix a bug in significant_terms (#127975)#127993
elasticsearchmachine merged 1 commit intoelastic:8.18from
nik9000:sig_terms_big_oob_8_18

Conversation

@nik9000
Copy link
Member

@nik9000 nik9000 commented May 9, 2025

Fix a bug in the significant_terms agg where the "subsetSize" array is too small because we never collect the ordinal for the agg "above" it.

This mostly hits when the you do a range agg containing a significant_terms AND you only collect the first few ranges. range isn't particularly popular, but date_histogram is super popular and it rewrites into a range pretty commonly - so that's likely what's really hitting this - a date_histogram followed by a significant_text where the matches are all early in the date range held by the shard.

Fix a bug in the `significant_terms` agg where the "subsetSize" array is
too small because we never collect the ordinal for the agg "above" it.

This mostly hits when the you do a `range` agg containing a
`significant_terms` AND you only collect the first few ranges. `range`
isn't particularly popular, but `date_histogram` is super popular and it
rewrites into a `range` pretty commonly - so that's likely what's really
hitting this - a `date_histogram` followed by a `significant_text` where
the matches are all early in the date range held by the shard.
@nik9000 nik9000 added backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) v8.18.2 labels May 9, 2025
@elasticsearchmachine elasticsearchmachine merged commit 52680e3 into elastic:8.18 May 9, 2025
15 checks passed
@nik9000 nik9000 deleted the sig_terms_big_oob_8_18 branch May 9, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport v8.18.2

2 participants