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 2.x] [Search Pipelines] Adding the SearchPhaseResultsProcessor interface in Search Pipeline #8512

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

navneet1v
Copy link
Contributor

@navneet1v navneet1v commented Jul 7, 2023

Description

Add new search pipeline processor type, SearchPhaseResultsProcessor, that can modify the result of one search phase before starting the next phase.

Along with this, added the code to resolve the Search pipeline once and added new SearchRequest type PipelinedRequest.

Backport of PR: #7283

Related Issues

Resolves #[Issue number to be closed when this PR is merged]
RFC: opensearch-project/neural-search#152

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

…pensearch-project#7283)

* Initial code for adding the SearchPhaseInjectorProcessor interface in Search Pipeline

Signed-off-by: Navneet Verma <[email protected]>

* Pass PipelinedRequest to SearchAsyncActions

We should resolve a search pipeline once at the start of a search
request and then propagate that pipeline through the async actions.

When completing a search phase, we will then use that pipeline to inject
behavior (if applicable).

Signed-off-by: Michael Froh <[email protected]>

* Renamed SearchPhaseInjectorProcessor to SearchPhaseResultsProcessor and fixed the comments

Signed-off-by: Navneet Verma <[email protected]>

* Make PipelinedSearchRequest extend SearchRequest

Rather than wrapping a SearchRequest in a PipelinedSearchRequest,
changes are less intrusive if we say that a PipelinedSearchRequest
"is a" SearchRequest.

Signed-off-by: Michael Froh <[email protected]>

* Revert code change from merge conflict

Signed-off-by: Michael Froh <[email protected]>

* Updated the changelog with more appropiate wording for the change.

Signed-off-by: Navneet Verma <[email protected]>

* Fixed Typos in the code

Signed-off-by: Navneet Verma <[email protected]>

* Fixing comments relating to return of SearchPhaseResults from processor

Signed-off-by: Navneet Verma <[email protected]>

* Moved SearchPhaseName enum in separate class and fixed comments.

Signed-off-by: Navneet Verma <[email protected]>

* Resolve remaining merge conflict

Signed-off-by: Michael Froh <[email protected]>

---------

Signed-off-by: Navneet Verma <[email protected]>
Signed-off-by: Michael Froh <[email protected]>
Co-authored-by: Michael Froh <[email protected]>
Co-authored-by: Andrew Ross <[email protected]>
@navneet1v
Copy link
Contributor Author

@andrross , @reta can you look at this PR which is a backport PR, that has been approved already by you guys. :)

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Gradle Check (Jenkins) Run Completed with:

@tlfeng tlfeng added backport PRs or issues specific to backporting features or enhancments Search Search query, autocomplete ...etc v2.9.0 'Issues and PRs related to version v2.9.0' labels Jul 7, 2023
Copy link
Collaborator

@tlfeng tlfeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, because it's identical with the commit b33979a that merged in main branch.

@tlfeng tlfeng merged commit 56a24bb into opensearch-project:2.x Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments Search Search query, autocomplete ...etc v2.9.0 'Issues and PRs related to version v2.9.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants