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

Check that sort fields on all indices are compatible #74190

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

scampi
Copy link
Contributor

@scampi scampi commented Jun 16, 2021

Close #73146

@elasticsearchmachine elasticsearchmachine added the external-contributor Pull request authored by a developer outside the Elasticsearch team label Jun 16, 2021
@mark-vieira mark-vieira added the :Search/Search Search-related issues that do not fall into other categories label Jun 25, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jun 25, 2021
@elasticmachine
Copy link
Collaborator

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

@scampi
Copy link
Contributor Author

scampi commented Jul 20, 2021

Is a different solution being considered for this ?

Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

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

Hi @scampi, thanks for working on this issue and apologies for the late response, this somehow fell through the cracks.
After taking a look at the issue in #73146 and the proposed fix now, I'm afraid that the proposed solution of comparing DocValueFormats Writable name might break some sort behaviour between types that currently works, while it might not be enough to prevent ClassCast exceptions for other types.
For example sorting across “keyword” and “version” type entries in different indices currently works, although the result might not always be expected (the special sorting of version fields is most likely not honoured), while e.g. mixing “double” and “float” numeric types still leads to a “class_cast_exception”, so it isn’t caught earlier by the modification to the
“validateMergeSortValueFormats” method.
I’m currently unsure where the best place to fix this would be and what kind of sorting behaviour between different mapping types we want to support, but I’ll hopefully get some info on this soon. Will either reply here or on the original issue.

@cbuescher cbuescher self-assigned this Sep 23, 2021
@elasticsearchmachine elasticsearchmachine changed the base branch from master to main July 22, 2022 23:11
@javanna javanna added :Search Relevance/Search Catch all for Search Relevance and removed :Search/Search Search-related issues that do not fall into other categories labels Jul 17, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Jul 17, 2024
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine removed the Team:Search Meta label for search team label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor Pull request authored by a developer outside the Elasticsearch team :Search Relevance/Search Catch all for Search Relevance Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClassCastException when sorting on incompatible fields
6 participants