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

fixing 500 bug on empty lexical query #840

Merged
merged 14 commits into from
May 21, 2024
Merged

Conversation

RaynorChavez
Copy link
Contributor

@RaynorChavez RaynorChavez commented May 19, 2024

  • 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

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added / updated (for bug fixes / features)

vicilliar
vicilliar previously approved these changes May 20, 2024
@RaynorChavez RaynorChavez merged commit a9d4ee1 into mainline May 21, 2024
20 of 23 checks passed
@RaynorChavez RaynorChavez deleted the raynor/500_bug_query branch May 21, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants