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

[BUG] ignoreFailure boolean Value is not used in Search Response Processors #16100

Closed
brianf-aws opened this issue Sep 26, 2024 · 1 comment
Closed
Labels
bug Something isn't working Search Search query, autocomplete ...etc untriaged

Comments

@brianf-aws
Copy link

Describe the bug

Search Response processors don't use the ignoreFailure flag to do something in response of a possible failures. Instead majority of processors throw exceptions. If you take a look at the corresponding tests associated with those Response Processors tests don't incorporate asserting the ignoreFailure flag to be true.

Response Processors that don’t Use ignoreFailure within the business logic (ctrl F : ignoreFailure)
CollapseResponseProcessor:
OverSampleRequestProcessor:
RenameFieldResponseProcessor(has ignoreMissing and incorporates logic):
SortResponseProcessor:
SplitResponseProcessor:
TruncateHitsResponseProcessor:

Related component

Search

To Reproduce

  1. Go to any of the following Search Reponse Processor classes and observe that ignoreFailure is not being used
  2. Go to any test for a Search Response Processor that checks for failures (i.e. an exception is thrown) for example TruncateHitsResponseProcessorTests
  3. run the test see it works, cahnge the ignoreFailure argument as True, The expected behavior is that its supposed to not return a exception but rather return something safe like the original SearchResponse for example. But even changing this field passes the test meaning it still returns an exception

Expected behavior

The expected behavior is that its supposed to not return a exception but rather return something safe like the original SearchResponse for example. But even changing this (ignoreField) field passes the test (i.e any test that involves throwing an exception)

Additional Details

Plugins
N/A
Screenshots
N/A
Host/Environment (please complete the following information):

  • OS: N/A

Additional context
Im currently writing a rescore(Name pending) Search Response processor and noticed that this flag is never used in the processors or the tests. I would like clarification on this detail as it ties in with what OS documentation states about ignoreFailure

@brianf-aws brianf-aws added bug Something isn't working untriaged labels Sep 26, 2024
@github-actions github-actions bot added the Search Search query, autocomplete ...etc label Sep 26, 2024
@brianf-aws
Copy link
Author

Speaking to engineers I learned that its not the responsibility of the Search Response Processor to handle this error instead the Search Pipeline class

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Search Project Board Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Search Search query, autocomplete ...etc untriaged
Projects
Status: Done
Development

No branches or pull requests

1 participant