-
Notifications
You must be signed in to change notification settings - Fork 70
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] add non-null check for queryBuilder in NeuralQueryEnricherProcessor #615
[Fix] add non-null check for queryBuilder in NeuralQueryEnricherProcessor #615
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #615 +/- ##
=========================================
Coverage 84.43% 84.44%
- Complexity 603 604 +1
=========================================
Files 48 48
Lines 1825 1826 +1
Branches 275 276 +1
=========================================
+ Hits 1541 1542 +1
Misses 161 161
Partials 123 123 ☔ View full report in Codecov by Sentry. |
Seems there is a failed test about model deployment. I think this is a flaky test not related to code changes here. For bwc failures, it's not related to code changes here neither. We can find the same failure in #602 |
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
571d4f4
to
38eda5f
Compare
rebase main |
All checks have passed. @vibrantvarun Could you please help review this and #614 ? |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-615-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b97dbe80f0b1dd8578a2dcdbed702c7660849747
# Push it to GitHub
git push --set-upstream origin backport/backport-615-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
…ssor (opensearch-project#615) * fix: add non-null check in NeuralQueryEnricherProcessor Signed-off-by: zhichao-aws <zhichaog@amazon.com> * add change log Signed-off-by: zhichao-aws <zhichaog@amazon.com> * optimize assert in ut Signed-off-by: zhichao-aws <zhichaog@amazon.com> --------- Signed-off-by: zhichao-aws <zhichaog@amazon.com> (cherry picked from commit b97dbe8)
…yEnricherProcessor (#619) * [Fix] add non-null check for queryBuilder in NeuralQueryEnricherProcessor (#615) * fix: add non-null check in NeuralQueryEnricherProcessor Signed-off-by: zhichao-aws <zhichaog@amazon.com> * add change log Signed-off-by: zhichao-aws <zhichaog@amazon.com> * optimize assert in ut Signed-off-by: zhichao-aws <zhichaog@amazon.com> --------- Signed-off-by: zhichao-aws <zhichaog@amazon.com> (cherry picked from commit b97dbe8) * update pr number Signed-off-by: zhichao-aws <zhichaog@amazon.com> * fix test compile Signed-off-by: zhichao-aws <zhichaog@amazon.com> --------- Signed-off-by: zhichao-aws <zhichaog@amazon.com>
…ssor (opensearch-project#615) * fix: add non-null check in NeuralQueryEnricherProcessor Signed-off-by: zhichao-aws <zhichaog@amazon.com> * add change log Signed-off-by: zhichao-aws <zhichaog@amazon.com> * optimize assert in ut Signed-off-by: zhichao-aws <zhichaog@amazon.com> --------- Signed-off-by: zhichao-aws <zhichaog@amazon.com> Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Description
In #337 and #541 we support the default model id for
neural
andhybrid
query. However, in current implementation, after we set up a search pipeline to support default model id, we can not search with empty query body (i.e. GET /index_name/_search or POST /index_name/_search). We'll get exception like below:TransportError(500, 'null_pointer_exception', 'Cannot invoke "org.opensearch.index.query.QueryBuilder.visit(org.opensearch.index.query.QueryBuilderVisitor)" because "queryBuilder" is null')
.This PR fix this exception by adding a non-null check in NeuralQueryEnricherProcessor.
Issues Resolved
[List any issues this PR will resolve]
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.