Skip to content

Conversation

@Darkheir
Copy link
Contributor

@Darkheir Darkheir commented Dec 3, 2025

Description

Add support for the case_insensitive parameter for some elasticsearch DSL queries:

  • term
  • prefix
  • regex
  • wildcard

To support case insensitive search on regex based ASTs a mode modifier (?i), is added at the beginning of the regex string.

For term queries this PR fallback to using a RegexQuery AST when case_insensitive is set to True.
It seems that elasticsearch uses a case insensitive Lucene automaton to cover this case.

How was this PR tested?

Added integration tests

Copy link
Contributor

@trinity-1686a trinity-1686a left a comment

Choose a reason for hiding this comment

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

lgtm. can you fix the formatting issue before i merge?

@rdettai-sk rdettai-sk force-pushed the feat/elastic_dsl_case_insensitive branch from 4821ff8 to 92be2de Compare December 5, 2025 11:12
@rdettai-sk rdettai-sk enabled auto-merge (squash) December 5, 2025 11:12
auto-merge was automatically disabled December 8, 2025 08:28

Head branch was pushed to by a user without write access

@Darkheir Darkheir force-pushed the feat/elastic_dsl_case_insensitive branch from 92be2de to df286ef Compare December 8, 2025 08:28
@Darkheir Darkheir force-pushed the feat/elastic_dsl_case_insensitive branch from df286ef to 2f68622 Compare December 8, 2025 08:30
@rdettai-sk rdettai-sk merged commit b6f853f into quickwit-oss:main Dec 8, 2025
4 checks passed
PSeitz-dd pushed a commit that referenced this pull request Dec 10, 2025
* feat: Add case_insensitive param to some Elastic DSL queries

Signed-off-by: Darkheir <[email protected]>

* Apply PR review sugestion

Signed-off-by: Darkheir <[email protected]>

---------

Signed-off-by: Darkheir <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants