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)
When a user requests a lexical search with q="" (an empty string), marqo returns a 500 error.
What is the new behavior (if this is a feature change)?
The bug is due to _lexical_search not creating a valid yql expression when the string is empty. We add two new conditionals in _to_vespa_lexical_query
q="" : Empty results regardless of filter , ... where false
q="*" : Everything, apply filter if provided, ... where true
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Searching q="*" now returns all documents.
Have unit tests been run against this PR? (Has there also been any additional testing?)
Yes, added a new test test_empty_lexical_query
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
[x] The commit message follows our guidelines
[x] Tests for the changes have been added (for bug fixes/features)
[ ] Docs have been added / updated (for bug fixes / features)
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) When a user requests a lexical search with
q=""
(an empty string), marqo returns a 500 error.What is the new behavior (if this is a feature change)? The bug is due to
_lexical_search
not creating a valid yql expression when the string is empty. We add two new conditionals in_to_vespa_lexical_query
q="" : Empty results regardless of filter ,
... where false
q="*" : Everything, apply filter if provided,... where true
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?) Searching
q="*"
now returns all documents.Have unit tests been run against this PR? (Has there also been any additional testing?) Yes, added a new test
test_empty_lexical_query
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
[x] The commit message follows our guidelines
[x] Tests for the changes have been added (for bug fixes/features)
[ ] Docs have been added / updated (for bug fixes / features)