-
Notifications
You must be signed in to change notification settings - Fork 183
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
Include aggregations and suggest in SearchTemplateResponse #462
Conversation
Signed-off-by: Norbert Érsek <enorby1@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Just needs tests that exercise this code, please.
On it. Actually I think I found a better way of implementing it as well. Inspired by MsearchTemplateResponse, that simply extends the MultiSearchResult, there is no reason we can't do the same for the regular SearchTemplateResponses (extend SearchResponse). Would keep the responses consistent, as well as get rid of duplicate code. Will update the PR soon. |
Signed-off-by: Norbert Érsek <enorby1@gmail.com>
Hi @dblock and others, can you please check? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Super idea. I don't see any downsides, @reta?
@eNorby1 I really like the direction you ended up at, I would suggest minor design change: introduce intermediary Why I am suggesting that instead of subclassing |
@reta makes sense. I'll have a look, thanks |
Hi @reta I did the change you suggested, can you please check? |
Signed-off-by: Norbert Érsek <enorby1@gmail.com>
java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchResult.java
Show resolved
Hide resolved
java-client/src/main/java/org/opensearch/client/opensearch/core/search/SearchResult.java
Show resolved
Hide resolved
Signed-off-by: Norbert Érsek <enorby1@gmail.com>
* Include aggregations and suggest in SearchTemplateResponse Signed-off-by: Norbert Érsek <enorby1@gmail.com> * make SearchTemplateResponse extend SearchResponse, add test cases Signed-off-by: Norbert Érsek <enorby1@gmail.com> * Introduce intermediary SearchResult class Signed-off-by: Norbert Érsek <enorby1@gmail.com> * Fix copyright header of new class Signed-off-by: Norbert Érsek <enorby1@gmail.com> --------- Signed-off-by: Norbert Érsek <enorby1@gmail.com> (cherry picked from commit 81ed75c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…onse (#468) * Include aggregations and suggest in SearchTemplateResponse (#462) * Include aggregations and suggest in SearchTemplateResponse Signed-off-by: Norbert Érsek <enorby1@gmail.com> * make SearchTemplateResponse extend SearchResponse, add test cases Signed-off-by: Norbert Érsek <enorby1@gmail.com> * Introduce intermediary SearchResult class Signed-off-by: Norbert Érsek <enorby1@gmail.com> * Fix copyright header of new class Signed-off-by: Norbert Érsek <enorby1@gmail.com> --------- Signed-off-by: Norbert Érsek <enorby1@gmail.com> (cherry picked from commit 81ed75c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix integration test for backporting Signed-off-by: Norbert Érsek <enorby1@gmail.com> --------- Signed-off-by: Norbert Érsek <enorby1@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Added support for aggregations and suggest in SearchTemplateResponse
Issues Resolved
Resolves #456
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.