Nested terms and cardinality aggregation causes scoring exception #112975
Labels
:Analytics/Aggregations
Aggregations
>bug
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
Elasticsearch Version
8.15
Installed Plugins
No response
Java Version
bundled
OS Version
Linux 3acef6594579 6.5.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 9 22:39:36 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
Problem Description
Under specific conditions I am hitting a runtime_exception when using some specific aggregations. Namely, a terms and cardinality aggregation inside a terms aggregation inside a nested aggregation. See the reproduction steps below.
The error is:
Steps to Reproduce
I can work around this by adding
execution_hint: direct
to thecardinality
aggregation, but from reading the code this appears to be a bug since the MultiBucketCollector is defaulting to ScoreMode.COMPLETE even though the sub-aggregations do not need any scoring (here).Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: