-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[Bug Fix] Fix the backward compatibility regression with COMPLEMENT
for Regexp queries introduced in OpenSearch 3.0
#18640
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
Conversation
COMPLEMENT
for Regexp queries COMPLEMENT
for Regexp queries
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18640 +/- ##
============================================
- Coverage 72.80% 72.72% -0.09%
+ Complexity 68437 68363 -74
============================================
Files 5563 5563
Lines 314174 314177 +3
Branches 45554 45555 +1
============================================
- Hits 228726 228474 -252
- Misses 66871 67166 +295
+ Partials 18577 18537 -40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cef249f
to
c1a60ba
Compare
❌ Gradle check result for c1a60ba: 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? |
c1a60ba
to
e1ea812
Compare
❌ Gradle check result for e1ea812: 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? |
e2e52bb
to
fb4f5d6
Compare
❌ Gradle check result for fb4f5d6: 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? |
fb4f5d6
to
e0b74e4
Compare
❌ Gradle check result for e0b74e4: 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? |
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
e0b74e4
to
b445a49
Compare
COMPLEMENT
for Regexp queries COMPLEMENT
for Regexp queries introduced in OpenSearch 3.0
… for Regexp queries introduced in OpenSearch 3.0 (#18640) * FIx ~ bug Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update changelog Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> --------- Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> (cherry picked from commit 1af55d2) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Coming from @msfroh suggestion #18397 (comment) I can see the issue where the
COMPLEMENT
is dropped andsanitisedSyntaxFlag
returns as 0. With this change I see the value as 65536 (0x10000
) which works as expected.Added an IT test as I assume we cannot test this with existing unit tests in
RegexpQueryBuilderTests
.Background, the
COMPLEMENT(RegExp.DEPRECATED_COMPLEMENT),
is updated as part of #16366Note
When we upgrade to Lucene 11 (OpenSearch 4.0), we should:
COMPLEMENT(RegExp.DEPRECATED_COMPLEMENT)
, from OpenSearchRegexpFlag
class.RegexpQueryBuilder.java
~
operator and remove COMPLEMENT from the flags listCC: @getsaurabh02
Related Issues
#18397
Check List
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.