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

[Backport to 1.3] Empty search results bug fix (#495) #522

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

kaituo
Copy link
Collaborator

@kaituo kaituo commented Apr 25, 2022

Description

  • Check if indices exist in the presence of empty search results

Previously, CompositeRetriever throws an IllegalArgumentException in the presence of empty results, which gets translated to internal failure and increments AD failure count. When the source index is a regex like blah*, we will get an empty response even if the index does not exist. This PR checks indices exist in the presence of empty search results. If yes, we throw an IndexNotFoundException that ends up being converted to EndRunException; if no, we still throw an IllegalArgumentException.

Testing done:

  1. added unit tests
  2. reproduced manually and verified the change fixed the issue.

Signed-off-by: Kaituo Li [email protected]

Check List

  • Commits are signed per the DCO using --signoff

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.

…rch results (opensearch-project#495)

* Check if indices exist in the presence of empty search results

Previously, CompositeRetriever throws an IllegalArgumentException in the presence of empty results, which gets translated to internal failure and increments AD failure count. When the source index is a regex like blah*, we will get an empty response even if the index does not exist. This PR checks indices exist in the presence of empty search results. If yes, we throw an IndexNotFoundException that ends up being converted to EndRunException; if no, we still throw an IllegalArgumentException.

Testing done:
1. added unit tests
2. reproduced manually and verified the change fixed the issue.

Signed-off-by: Kaituo Li <[email protected]>
@kaituo kaituo added the bug Something isn't working label Apr 25, 2022
@kaituo kaituo requested review from ylwu-amzn and amitgalitz April 25, 2022 22:30
@kaituo kaituo merged commit 37a9fb8 into opensearch-project:1.3 Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants