-
Notifications
You must be signed in to change notification settings - Fork 190
[BUG] Like operator should case insensitive by default #1156
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingv2.5.0'Issues and PRs related to version v2.5.0''Issues and PRs related to version v2.5.0'
Description
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
Amberasamber. PatternAmbe?should not matchamber, but with wildcard query bug, it matched. - In memory processing read source doc without lowercase token filter, the value is
Amber, patternAmbe?matched as expected.
What is the expected behavior?
I suggested to change LIKE using case-insensitive = true by default.
- which is actually OpenSearch 2.4 behaviour, it is not an breaking change.
- In MySQL, SQL patterns are case-insensitive by default..
- If user want case sensitive, use wildcard query instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingv2.5.0'Issues and PRs related to version v2.5.0''Issues and PRs related to version v2.5.0'