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

[BUG] Like operator should case insensitive by default #1156

Closed
penghuo opened this issue Dec 10, 2022 · 0 comments
Closed

[BUG] Like operator should case insensitive by default #1156

penghuo opened this issue Dec 10, 2022 · 0 comments
Labels
bug Something isn't working v2.5.0 'Issues and PRs related to version v2.5.0'

Comments

@penghuo
Copy link
Collaborator

penghuo commented Dec 10, 2022

What is the bug?
OpenSearch 2.5 fix the wildcard query case insensitive bug. More reading at opensearch-project/OpenSearch#5515.

Currently, SQL engine

  • when rewrite Like operator as wildcard query, use default setting case-insensitive = false.
  • when compile Like operator as Pattern, use default setting case-insensitive = false.

Because of the bug, Like operators works in 2.4, e.g. value = Amber, pattern = Ambe?

  • As DSL query, Standard Analyzer uses the lowercase token filter index Amber as amber. Pattern Ambe? should not match amber, but with wildcard query bug, it matched.
  • In memory processing read source doc without lowercase token filter, the value is Amber, pattern Ambe? matched as expected.

What is the expected behavior?
I suggested to change LIKE using case-insensitive = true by default.

@penghuo penghuo added bug Something isn't working untriaged v2.5.0 'Issues and PRs related to version v2.5.0' and removed untriaged labels Dec 10, 2022
@penghuo penghuo closed this as completed Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.5.0 'Issues and PRs related to version v2.5.0'
Projects
None yet
Development

No branches or pull requests

1 participant