Skip to content

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

@penghuo

Description

@penghuo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv2.5.0'Issues and PRs related to version v2.5.0'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions