-
Notifications
You must be signed in to change notification settings - Fork 196
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
[Releases 2.13] Output hybrid error message in marqo logs #1108
base: releases/2.13
Are you sure you want to change the base?
Conversation
2d3ecb5
to
fb1c54d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check with Vespa team about the best practices of handling errors in the search chain.
@@ -105,6 +106,8 @@ public Result search(Query query, Execution execution) { | |||
+ e.toString()); | |||
} | |||
|
|||
raiseErrorIfPresent(resultLexical, resultTensor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if we should handle errors differently after reading Vespa docs. Instead of raising Runtime exception everywhere (which cause Vespa to always return 500). We should probably leverage HitGroup().addError method which is suggested in this doc.
For this specific scenario, we are collecting errors from both lexical result and tensor result. So we can do this:
HitGroup combinedErrors = new HitGroup();
combinedErrors.addErrorsFrom(resultTensor.hits());
combinedErrors.addErrorsFrom(resultLexical.hits());
if (combinedErrors.getError() != null) {
return new Result(query, combinedErrors);
}
In this way, you should be able to collect all the errors from both result and allow search chain to handle the error properly, instead of just concatenating the first error found in each result.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
bug fix
What is the current behavior? (You can also link to an open issue here)
any errors in tensor or lexical search in hybrid rrf search are swallowed by java code
What is the new behavior (if this is a feature change)?
output any tensor or lexical errors in marqo logs
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
no
Have unit tests been run against this PR? (Has there also been any additional testing?)
Related Python client changes (link commit/PR here)
Related documentation changes (link commit/PR here)
Other information:
Please check if the PR fulfills these requirements