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

Make empty string searches be consistent with case (in)sensitivity #110833

Merged

Conversation

benwtrent
Copy link
Member

If we determine that the searchable term is completely empty, we switch back to a regular term query. This way we return the same docs as expected when we do a case sensitive search.

closes: #108968

@benwtrent benwtrent added >bug v8.16.0 :Search Relevance/Search Catch all for Search Relevance labels Jul 12, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Jul 12, 2024
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Member

@carlosdelest carlosdelest left a comment

Choose a reason for hiding this comment

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

LGTM - a question on test assertions that may be needed

Copy link
Contributor

@tteofili tteofili left a comment

Choose a reason for hiding this comment

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

LGTM

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

@elasticmachine update branch

@elasticsearchmachine
Copy link
Collaborator

Hi @benwtrent, I've updated the changelog YAML for you.

@benwtrent benwtrent merged commit 28c7cbc into elastic:main Jul 17, 2024
14 of 15 checks passed
@benwtrent benwtrent deleted the bugfix/case-insensitive-empty-str-consistency branch July 17, 2024 19:21
ioanatia pushed a commit to ioanatia/elasticsearch that referenced this pull request Jul 22, 2024
…lastic#110833)

If we determine that the searchable term is completely empty, we switch back to a regular term query. This way we return the same docs as expected when we do a case sensitive search.

closes: elastic#108968
salvatore-campagna pushed a commit to salvatore-campagna/elasticsearch that referenced this pull request Jul 23, 2024
…lastic#110833)

If we determine that the searchable term is completely empty, we switch back to a regular term query. This way we return the same docs as expected when we do a case sensitive search.

closes: elastic#108968
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 Relevance/Search Catch all for Search Relevance Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Term matching on empty string behaves differently when case_insensitive==true
5 participants