Skip to content

[ESRTEST-31237] Add 'sort' parameter to TopHits aggregation - #78

Open
sergio-bobillier wants to merge 1 commit into
sb-ESRTEST-31237-add-missing-param-to-terms-aggregationfrom
sb-ESRTEST-31237-add-sort-parameter-to-top-hits-agrregation
Open

[ESRTEST-31237] Add 'sort' parameter to TopHits aggregation#78
sergio-bobillier wants to merge 1 commit into
sb-ESRTEST-31237-add-missing-param-to-terms-aggregationfrom
sb-ESRTEST-31237-add-sort-parameter-to-top-hits-agrregation

Conversation

@sergio-bobillier

Copy link
Copy Markdown
Collaborator

The parameter allows the user to determine the order the documents are put into to determine what documents are the "top hits". By default, they are ordered by the score of the main query, however, that is not always what one might want.

This parameter allows possibilities like sorting the top hits in chronological order or by price in ascending order, etc. These are things that cannot be reflected by the score of the main query even if it includes a "corresponding" sort clause.

The parameter allows the user to determine the order the documents are
put into to determine what documents are the "top hits". By default,
they are ordered by the score of the main query, however, that is not
always what one might want.

This parameter allows possibilities like sorting the top hits in
chronological order or by price in ascending order, etc. These are
things that cannot be reflected by the score of the main query even if
it includes a "corresponding" sort clause.
@sergio-bobillier
sergio-bobillier force-pushed the sb-ESRTEST-31237-add-sort-parameter-to-top-hits-agrregation branch from f117aae to a1b1208 Compare August 31, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant