Skip to content

Add ability to sort composite aggr, with missing_bucket = true, like a normal search sort #63523

@joevalerio

Description

@joevalerio

Add ability to sort composite aggr, with missing_bucket = true, like a normal search sort

For normal search sort you have the following options:

"The missing parameter specifies how docs which are missing the sort field should be treated: The missing value can be set to _last, _first, or a custom value (that will be used for missing docs as the sort value). The default is _last."
- sort-search-results

When you are using a composite aggr sort with missing_bucket = true the options are:

"The order specified in the source dictates whether the null values should rank first (ascending order, asc) or last (descending order, desc)."
- search-aggregations-bucket-composite-aggregation

These options are conflicting, in that I can never get the nulls always last for both of asc or desc using a composite aggr which conflicts with the normal search sorting leaving my application inconsistent. I would really appreciate adding the ability to sort nulls always last or always first like the normal search sort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    >enhancementTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions