Skip to content

Sorting terms buckets on nested or parent or child aggregations silently sorts incorrectly #66876

@nik9000

Description

@nik9000

When you sort the terms aggregation on nested or a child or a parent aggregation the on-data-node sorting sorts by "empty" values. This can be masked by a large enough shard_size so it has slipped through our test cases for a while, but this shows the failures. It looks like this is caused because we delay collecting parent and nested until right before we build buckets.

Replaces #53534 and #53570. Both are about error messages trying to sort. You actually can sort now, it just doesn't work 😢.

Relates to #63811.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions