-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature Request] SearchExtBuilder in SearchResponse #9328
Comments
…](opensearch-project#9328) Signed-off-by: Austin Lee <[email protected]>
@msfroh Tagging you to get feedback on this change. Is this generally in the right direction? Thanks in advance. |
Can we assign this one to me and remove the 'untriaged' label? |
@austintlee can you please add a sample response on where this new key will be added in Search Response. |
Note that I fixed the indenting issue in the sample. @navneet1v |
@austintlee lets add the sample here too. So that we understand what is scope of this issue. |
Sample added to the description above. Thanks! |
…](opensearch-project#9328) Signed-off-by: Austin Lee <[email protected]>
* Add SearchExtBuilders to SearchResponse. [Issue #9328](#9328) Signed-off-by: Austin Lee <[email protected]> * Keep SearchResponse immutable, add a constructor to take a List of SearchExtBuilders. Signed-off-by: Austin Lee <[email protected]> * Fix spotlessJavaCheck findings. Signed-off-by: Austin Lee <[email protected]> * Move SearchExtBuilders into SearchResponseSections, fix indenting in SearchRequest. Signed-off-by: Austin Lee <[email protected]> * Updated changelog (mixed minor formatting issues), added version checks on serialization/deserialization, added a Builder for making copies of SearchResponse easier. Signed-off-by: Austin Lee <[email protected]> * Add GenericSearchExtBuilder as a catch-all for SearchExtBuilders not registered in xcontent registry. Signed-off-by: Austin Lee <[email protected]> * Simplify GenericSearchExtBuilder using a single Object member. Signed-off-by: Austin Lee <[email protected]> * Address additional review comments. Signed-off-by: Austin Lee <[email protected]> * Add Javadocs. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]>
* Add SearchExtBuilders to SearchResponse. [Issue opensearch-project#9328](opensearch-project#9328) Signed-off-by: Austin Lee <[email protected]> * Keep SearchResponse immutable, add a constructor to take a List of SearchExtBuilders. Signed-off-by: Austin Lee <[email protected]> * Fix spotlessJavaCheck findings. Signed-off-by: Austin Lee <[email protected]> * Move SearchExtBuilders into SearchResponseSections, fix indenting in SearchRequest. Signed-off-by: Austin Lee <[email protected]> * Updated changelog (mixed minor formatting issues), added version checks on serialization/deserialization, added a Builder for making copies of SearchResponse easier. Signed-off-by: Austin Lee <[email protected]> * Add GenericSearchExtBuilder as a catch-all for SearchExtBuilders not registered in xcontent registry. Signed-off-by: Austin Lee <[email protected]> * Simplify GenericSearchExtBuilder using a single Object member. Signed-off-by: Austin Lee <[email protected]> * Address additional review comments. Signed-off-by: Austin Lee <[email protected]> * Add Javadocs. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]> (cherry picked from commit 60787b8)
* Add SearchExtBuilders to SearchResponse. Signed-off-by: Austin Lee <[email protected]> * Add SearchExtBuilders to SearchResponse (#9379) * Add SearchExtBuilders to SearchResponse. [Issue #9328](#9328) Signed-off-by: Austin Lee <[email protected]> * Keep SearchResponse immutable, add a constructor to take a List of SearchExtBuilders. Signed-off-by: Austin Lee <[email protected]> * Fix spotlessJavaCheck findings. Signed-off-by: Austin Lee <[email protected]> * Move SearchExtBuilders into SearchResponseSections, fix indenting in SearchRequest. Signed-off-by: Austin Lee <[email protected]> * Updated changelog (mixed minor formatting issues), added version checks on serialization/deserialization, added a Builder for making copies of SearchResponse easier. Signed-off-by: Austin Lee <[email protected]> * Add GenericSearchExtBuilder as a catch-all for SearchExtBuilders not registered in xcontent registry. Signed-off-by: Austin Lee <[email protected]> * Simplify GenericSearchExtBuilder using a single Object member. Signed-off-by: Austin Lee <[email protected]> * Address additional review comments. Signed-off-by: Austin Lee <[email protected]> * Add Javadocs. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]> (cherry picked from commit 60787b8) * Update SearchExtBuilder support version check to work on 2.x line. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]> Signed-off-by: Andriy Redko <[email protected]> Co-authored-by: Andriy Redko <[email protected]>
PRs merged into |
* Add SearchExtBuilders to SearchResponse. [Issue opensearch-project#9328](opensearch-project#9328) Signed-off-by: Austin Lee <[email protected]> * Keep SearchResponse immutable, add a constructor to take a List of SearchExtBuilders. Signed-off-by: Austin Lee <[email protected]> * Fix spotlessJavaCheck findings. Signed-off-by: Austin Lee <[email protected]> * Move SearchExtBuilders into SearchResponseSections, fix indenting in SearchRequest. Signed-off-by: Austin Lee <[email protected]> * Updated changelog (mixed minor formatting issues), added version checks on serialization/deserialization, added a Builder for making copies of SearchResponse easier. Signed-off-by: Austin Lee <[email protected]> * Add GenericSearchExtBuilder as a catch-all for SearchExtBuilders not registered in xcontent registry. Signed-off-by: Austin Lee <[email protected]> * Simplify GenericSearchExtBuilder using a single Object member. Signed-off-by: Austin Lee <[email protected]> * Address additional review comments. Signed-off-by: Austin Lee <[email protected]> * Add Javadocs. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]> Signed-off-by: Kaushal Kumar <[email protected]>
* Add SearchExtBuilders to SearchResponse. [Issue opensearch-project#9328](opensearch-project#9328) Signed-off-by: Austin Lee <[email protected]> * Keep SearchResponse immutable, add a constructor to take a List of SearchExtBuilders. Signed-off-by: Austin Lee <[email protected]> * Fix spotlessJavaCheck findings. Signed-off-by: Austin Lee <[email protected]> * Move SearchExtBuilders into SearchResponseSections, fix indenting in SearchRequest. Signed-off-by: Austin Lee <[email protected]> * Updated changelog (mixed minor formatting issues), added version checks on serialization/deserialization, added a Builder for making copies of SearchResponse easier. Signed-off-by: Austin Lee <[email protected]> * Add GenericSearchExtBuilder as a catch-all for SearchExtBuilders not registered in xcontent registry. Signed-off-by: Austin Lee <[email protected]> * Simplify GenericSearchExtBuilder using a single Object member. Signed-off-by: Austin Lee <[email protected]> * Address additional review comments. Signed-off-by: Austin Lee <[email protected]> * Add Javadocs. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]> Signed-off-by: Ivan Brusic <[email protected]>
* Add SearchExtBuilders to SearchResponse. [Issue opensearch-project#9328](opensearch-project#9328) Signed-off-by: Austin Lee <[email protected]> * Keep SearchResponse immutable, add a constructor to take a List of SearchExtBuilders. Signed-off-by: Austin Lee <[email protected]> * Fix spotlessJavaCheck findings. Signed-off-by: Austin Lee <[email protected]> * Move SearchExtBuilders into SearchResponseSections, fix indenting in SearchRequest. Signed-off-by: Austin Lee <[email protected]> * Updated changelog (mixed minor formatting issues), added version checks on serialization/deserialization, added a Builder for making copies of SearchResponse easier. Signed-off-by: Austin Lee <[email protected]> * Add GenericSearchExtBuilder as a catch-all for SearchExtBuilders not registered in xcontent registry. Signed-off-by: Austin Lee <[email protected]> * Simplify GenericSearchExtBuilder using a single Object member. Signed-off-by: Austin Lee <[email protected]> * Address additional review comments. Signed-off-by: Austin Lee <[email protected]> * Add Javadocs. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Is your feature request related to a problem? Please describe.
In conversational search where the result of Retrieval Augmented Generation (RAG) is a single "hit" (answer), I would like a way to include this answer in the search response separately from the search hits.
Describe the solution you'd like
As RAG is accomplished via a search pipeline, I would like a solution that makes it easy for users to match a part of the response with the search pipeline that generated the part. SearchRequest already provides this through SearchExtBuilders. Adding support for SearchExtBuilders to SearchResponse will probably solve a number of use cases.
Describe alternatives you've considered
For conversational search specifically, a generated answer could be returned as an additional search hit, but this feels hacky and won't generalize to solve other, similar problems that require something in the search response that does not alter SearchHits.
Additional context
#6794 also proposes a way to include extra information in SearchResponse.
Sample
The text was updated successfully, but these errors were encountered: