Skip to content

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

Closed

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.

Activity

  1. added
    bug
    v2.5.0
    and removed on Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugv2.5.0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions