Skip to content

[DOCS] Added sort order explanation #125182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 14, 2025

Conversation

thekofimensah
Copy link
Contributor

Changed the order of the example slightly to make it more understandable.

Added 2 missing key points:

  • Multiple sort options act as tie breakers
  • The order of those matter

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.1.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Mar 19, 2025
@thekofimensah
Copy link
Contributor Author

thekofimensah commented Mar 19, 2025

@georgewallace Do you know someone that can confirm this:

By default, Elasticsearch sorts numeric fields in descending order and string fields in ascending order

I couldn't find this anywhere (and it should be in this doc)

@PeteGillinElastic PeteGillinElastic added >docs General docs changes and removed needs:triage Requires assignment of a team area label labels Mar 21, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Docs Meta label for docs team label Mar 21, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@georgewallace georgewallace self-assigned this Apr 8, 2025
@shainaraskas shainaraskas added v9.0.0 auto-backport Automatically create backport pull requests when merged labels Apr 10, 2025
Copy link
Contributor

@leemthompo leemthompo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@leemthompo leemthompo merged commit 08beb53 into elastic:main Apr 14, 2025
8 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.0

georgewallace added a commit to georgewallace/elasticsearch that referenced this pull request Apr 14, 2025
* Added explanation of sort order and default behavior

* Update docs/reference/elasticsearch/rest-apis/sort-search-results.md

Co-authored-by: Liam Thompson <[email protected]>

---------

Co-authored-by: George Wallace <[email protected]>
Co-authored-by: Liam Thompson <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request Apr 14, 2025
* Added explanation of sort order and default behavior

* Update docs/reference/elasticsearch/rest-apis/sort-search-results.md



---------

Co-authored-by: Kofi B <[email protected]>
Co-authored-by: Liam Thompson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged >docs General docs changes external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Docs Meta label for docs team v9.0.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants