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

Add ext object to search response #4959

Merged
merged 4 commits into from
Sep 22, 2023
Merged

Add ext object to search response #4959

merged 4 commits into from
Sep 22, 2023

Conversation

kolchfa-aws
Copy link
Collaborator

Fixes #4877

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
@kolchfa-aws
Copy link
Collaborator Author

@austintlee Could you review this PR for technical accuracy please?


## The `ext` object

Starting with OpenSearch 2.10, plugin authors can add an `ext` object to the search response. The purpose of the `ext` object is to contain plugin-specific response fields. For example, in conversational search, the result of Retrieval Augmented Generation (RAG) is a single "hit" (answer). Plugin authors can include this answer in the search response as part of the `ext` object so it is separate from the search hits. In the following example response, the RAG result is in the `ext.generative_qa.answer` field:

Choose a reason for hiding this comment

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

Can you change 'generative_qa' to 'retrieval_augmented_generation'. Both here and in the sample below.

],
}, // end of hits
"ext": {
"generative_qa": { // a search response processor

Choose a reason for hiding this comment

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

retrieval_augmented_generation

Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
@kolchfa-aws
Copy link
Collaborator Author

Done

@kolchfa-aws kolchfa-aws added the release-notes PR: Include this PR in the automated release notes label Sep 6, 2023
@kolchfa-aws
Copy link
Collaborator Author

@austintlee I've changed both instances. Could you review again please?

@austintlee
Copy link

Looks good!

@kolchfa-aws
Copy link
Collaborator Author

@austintlee Thanks! Could you approve then?

Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@kolchfa-aws Just one added word. Thanks!

_api-reference/search.md Outdated Show resolved Hide resolved
Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
@kolchfa-aws kolchfa-aws added the 6 - Done but waiting to merge PR: The work is done and ready to merge label Sep 7, 2023
@kolchfa-aws kolchfa-aws merged commit 366bf65 into main Sep 22, 2023
5 checks passed
harshavamsi pushed a commit to harshavamsi/documentation-website that referenced this pull request Oct 31, 2023
* Add ext object to search response

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Update search.md

Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

* Update _api-reference/search.md

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

---------

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Co-authored-by: Nathan Bower <nbower@amazon.com>
vagimeli pushed a commit that referenced this pull request Dec 21, 2023
* Add ext object to search response

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Update search.md

Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

* Update _api-reference/search.md

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

---------

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Co-authored-by: Nathan Bower <nbower@amazon.com>
@Naarcha-AWS Naarcha-AWS deleted the ext-doc branch March 28, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6 - Done but waiting to merge PR: The work is done and ready to merge release-notes PR: Include this PR in the automated release notes v2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Add documentation for support for SearchResponse extensions via SearchExtBuilder
4 participants