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

Added support for msearch API to pass search pipeline name #15923

Merged
merged 8 commits into from
Sep 26, 2024

Conversation

owaiskazi19
Copy link
Member

@owaiskazi19 owaiskazi19 commented Sep 13, 2024

Description

Added support for msearch API to pass search pipeline name.
With this change a search pipeline name can be provided while making a msearch call

{ "index": "test"}
{ "query": { "match_all": {} }, "from": 0, "size": 10, "search_pipeline": "my_pipeline"}
{ "index": "test-1", "search_type": "dfs_query_then_fetch"}
{ "query": { "match_all": {} }, "search_pipeline": "my_pipeline1" }

Related Issues

Resolves #15748

Check List

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.

Copy link
Contributor

❌ Gradle check result for a6a64ee: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❕ Gradle check result for a6a64ee: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 70.58824% with 5 lines in your changes missing coverage. Please review.

Project coverage is 71.98%. Comparing base (1bc81d3) to head (a6a64ee).
Report is 175 commits behind head on main.

Files with missing lines Patch % Lines
...opensearch/search/builder/SearchSourceBuilder.java 78.57% 0 Missing and 3 partials ⚠️
...g/opensearch/action/search/MultiSearchRequest.java 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #15923      +/-   ##
============================================
+ Coverage     71.96%   71.98%   +0.02%     
- Complexity    64391    64418      +27     
============================================
  Files          5280     5280              
  Lines        300866   300886      +20     
  Branches      43474    43480       +6     
============================================
+ Hits         216510   216589      +79     
+ Misses        66639    66495     -144     
- Partials      17717    17802      +85     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@owaiskazi19
Copy link
Member Author

@msfroh can I get another review on this?

Copy link
Collaborator

@msfroh msfroh left a comment

Choose a reason for hiding this comment

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

Nice! Thanks, @owaiskazi19!

@owaiskazi19 owaiskazi19 merged commit daf1669 into opensearch-project:main Sep 26, 2024
35 of 36 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-15923-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 daf1669b7ca77c62fc82ba9162d3708702b13fce
# Push it to GitHub
git push --set-upstream origin backport/backport-15923-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-15923-to-2.x.

owaiskazi19 added a commit to owaiskazi19/OpenSearch that referenced this pull request Sep 26, 2024
…h-project#15923)

* Added support for search pipeline name in multi search API

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated CHANGELOG

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Pulled search pipeline in MultiSearchRequest and updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated SearchRequest with search pipeline from source

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Added tests for parseSearchRequest

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Guard serialization with version check

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated version and added another test for serialization

Signed-off-by: Owais <owaiskazi19@gmail.com>

---------

Signed-off-by: Owais <owaiskazi19@gmail.com>
@owaiskazi19
Copy link
Member Author

@msfroh
2.x PR: #16085
BWC version change PR to main: #16086

@msfroh
Copy link
Collaborator

msfroh commented Sep 26, 2024

@msfroh

2.x PR: #16085

BWC version change PR to main: #16086

@owaiskazi19 I'll merge both of these tomorrow morning. I've made the mistake of merging the first PR then going to sleep a few too many times. 😀

gaobinlong pushed a commit that referenced this pull request Sep 26, 2024
…name (#16085)

* Added support for msearch API to pass search pipeline name (#15923)

* Added support for search pipeline name in multi search API

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated CHANGELOG

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Pulled search pipeline in MultiSearchRequest and updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated SearchRequest with search pipeline from source

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Added tests for parseSearchRequest

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Guard serialization with version check

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated version and added another test for serialization

Signed-off-by: Owais <owaiskazi19@gmail.com>

---------

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated version to 2.18

Signed-off-by: Owais <owaiskazi19@gmail.com>

---------

Signed-off-by: Owais <owaiskazi19@gmail.com>
@dblock
Copy link
Member

dblock commented Sep 27, 2024

This is an API change, isn't it? It needs changes in api-specification repo please?

ruai0511 pushed a commit to ruai0511/OpenSearch that referenced this pull request Oct 4, 2024
…h-project#15923)

* Added support for search pipeline name in multi search API

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated CHANGELOG

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Pulled search pipeline in MultiSearchRequest and updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated SearchRequest with search pipeline from source

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Added tests for parseSearchRequest

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Guard serialization with version check

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated version and added another test for serialization

Signed-off-by: Owais <owaiskazi19@gmail.com>

---------

Signed-off-by: Owais <owaiskazi19@gmail.com>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 16, 2024
…h-project#15923)

* Added support for search pipeline name in multi search API

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated CHANGELOG

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Pulled search pipeline in MultiSearchRequest and updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated SearchRequest with search pipeline from source

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Added tests for parseSearchRequest

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Guard serialization with version check

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated version and added another test for serialization

Signed-off-by: Owais <owaiskazi19@gmail.com>

---------

Signed-off-by: Owais <owaiskazi19@gmail.com>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 17, 2024
…h-project#15923)

* Added support for search pipeline name in multi search API

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated CHANGELOG

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Pulled search pipeline in MultiSearchRequest and updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated SearchRequest with search pipeline from source

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Added tests for parseSearchRequest

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Guard serialization with version check

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated version and added another test for serialization

Signed-off-by: Owais <owaiskazi19@gmail.com>

---------

Signed-off-by: Owais <owaiskazi19@gmail.com>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 21, 2024
…h-project#15923)

* Added support for search pipeline name in multi search API

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated CHANGELOG

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Pulled search pipeline in MultiSearchRequest and updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated test

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated SearchRequest with search pipeline from source

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Added tests for parseSearchRequest

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Guard serialization with version check

Signed-off-by: Owais <owaiskazi19@gmail.com>

* Updated version and added another test for serialization

Signed-off-by: Owais <owaiskazi19@gmail.com>

---------

Signed-off-by: Owais <owaiskazi19@gmail.com>
@owaiskazi19 owaiskazi19 added the v2.18.0 Issues and PRs related to version 2.18.0 label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch backport-failed enhancement Enhancement or improvement to existing feature or request good first issue Good for newcomers Search Search query, autocomplete ...etc v2.18.0 Issues and PRs related to version 2.18.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Support "search-pipeline" in Multi-Search API
4 participants