Skip to content

Conversation

ishag4
Copy link
Contributor

@ishag4 ishag4 commented Oct 1, 2025

Description

To fix bug where executing a case-insensitive wildcard query combined with aggregations causes an ArrayIndexOutOfBoundsException. The root cause is related to how Lucene’s automaton handles case-insensitive wildcards without determinizing the automaton, leading to instability during query execution.
This PR fixes the issue by explicitly determinizing the automaton generated for case-insensitive wildcard queries before passing it to Lucene’s query execution layer. By converting the automaton to a deterministic finite automaton (DFA), we prevent the exception and ensure stable query execution.

Related Issues

Resolves #19319

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@ishag4 ishag4 requested a review from a team as a code owner October 1, 2025 06:29
@github-actions github-actions bot added bug Something isn't working good first issue Good for newcomers Search:Aggregations labels Oct 1, 2025
Copy link
Contributor

github-actions bot commented Oct 1, 2025

❌ Gradle check result for 3efbfa1: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Search:Aggregations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Error when use both wildcard + aggregation
1 participant