Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix case insensitive and escaped query on wildcard #16827

Conversation

HUSTERGS
Copy link
Contributor

Description

  1. fix case insensitve regexp query on wildcard field
  2. fix queries contains characters need to be escaped on wildcard field
  3. fix null pointer exception cause by plain text regex query on wildcard field
  4. add corresponding yml test

As for the comment by @msfroh , It may needs more thorough thinking, so this pr just functionally fixed the problem, the refactoring may leave for the future

Related Issues

Resolves #16754 #16755

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.

gesong.samuel added 2 commits December 11, 2024 17:26
Signed-off-by: gesong.samuel <[email protected]>
@HUSTERGS HUSTERGS force-pushed the fix_regex_case_insensitive_query_on_wildcard branch from b33ced2 to b7629b5 Compare December 11, 2024 09:27
Copy link
Contributor

✅ Gradle check result for b7629b5: SUCCESS

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 16 lines in your changes missing coverage. Please review.

Project coverage is 72.26%. Comparing base (cc990c0) to head (8c7856c).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...g/opensearch/index/mapper/WildcardFieldMapper.java 71.42% 10 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #16827   +/-   ##
=========================================
  Coverage     72.26%   72.26%           
- Complexity    65257    65277   +20     
=========================================
  Files          5299     5299           
  Lines        303490   303520   +30     
  Branches      43937    43942    +5     
=========================================
+ Hits         219321   219348   +27     
- Misses        66189    66213   +24     
+ Partials      17980    17959   -21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@msfroh msfroh left a comment

Choose a reason for hiding this comment

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

Looks good, thanks a lot @HUSTERGS!

@msfroh msfroh added backport 2.x Backport to 2.x branch v2.19.0 Issues and PRs related to version 2.19.0 labels Jan 9, 2025
Copy link
Contributor

❌ Gradle check result for 8c7856c: 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?

Copy link
Contributor

✅ Gradle check result for 8c7856c: SUCCESS

@msfroh msfroh merged commit 5afb92f into opensearch-project:main Jan 10, 2025
36 of 37 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 10, 2025
* fix case insensitive and escaped query on wildcard

Signed-off-by: gesong.samuel <[email protected]>

* add changelog

Signed-off-by: gesong.samuel <[email protected]>

---------

Signed-off-by: gesong.samuel <[email protected]>
Signed-off-by: Michael Froh <[email protected]>
Co-authored-by: gesong.samuel <[email protected]>
Co-authored-by: Michael Froh <[email protected]>
(cherry picked from commit 5afb92f)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch bug Something isn't working Search Search query, autocomplete ...etc v2.19.0 Issues and PRs related to version 2.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Term query on a wildcard field does not perform exact match
2 participants