Skip to content
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

Allow mismatched sort-by field types if there are no docs to sort #102779

Conversation

benwtrent
Copy link
Member

When searching multiple indices and a field only exists in ONE of the indices, we should allow sorting by that field, regardless of the "unmapped" type provided.

closes: #102723

@benwtrent benwtrent added >bug :Search/Search Search-related issues that do not fall into other categories v8.12.0 v8.11.2 labels Nov 29, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@elasticsearchmachine elasticsearchmachine added the Team:Search Meta label for search team label Nov 29, 2023
@elasticsearchmachine
Copy link
Collaborator

Hi @benwtrent, I've created a changelog YAML for you.

@benwtrent benwtrent removed the Team:Search Meta label for search team label Nov 29, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Search Meta label for search team label Nov 29, 2023
Copy link
Contributor

@mayya-sharipova mayya-sharipova left a comment

Choose a reason for hiding this comment

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

@benwtrent Thanks Ben for fixing a bug.

@benwtrent
Copy link
Member Author

@elasticmachine update branch

@benwtrent benwtrent added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Nov 30, 2023
@benwtrent
Copy link
Member Author

jenkins retest this please.

@benwtrent
Copy link
Member Author

run elasticsearch-ci

@benwtrent
Copy link
Member Author

@elasticmachine update branch

@elasticsearchmachine elasticsearchmachine merged commit 43dc74b into elastic:main Nov 30, 2023
@benwtrent benwtrent deleted the feature/allow-mismatched-sort-on-empty-result-fields branch November 30, 2023 19:40
@benwtrent
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.11

Questions ?

Please refer to the Backport tool documentation

benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Nov 30, 2023
…astic#102779)

When searching multiple indices and a field only exists in ONE of the
indices, we should allow sorting by that field, regardless of the
"unmapped" type provided.

closes: elastic#102723
(cherry picked from commit 43dc74b)
benwtrent added a commit that referenced this pull request Dec 1, 2023
…ort (#102779) (#102834)

* Allow mismatched sort-by field types if there are no docs to sort (#102779)

When searching multiple indices and a field only exists in ONE of the
indices, we should allow sorting by that field, regardless of the
"unmapped" type provided.

closes: #102723
(cherry picked from commit 43dc74b)

* fixing compile

* fixing format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >bug :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.11.2 v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to sort in 8.4+ if a field doesn't exist.
4 participants