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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

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

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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 59c9cfd: 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 141883d: 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 00df542: 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 d2fe2fb: 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 87fcc40: 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 87fcc40: 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
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.

Ahh! You lost the part that copies from the source into SearchRequest on the regular _search path. It would be really nice to get that part too.

Copy link
Contributor

❌ Gradle check result for fe74c21: 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 b2c2001: 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 a1bc82b: 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?

Comment on lines 302 to 304
if (in.getVersion().onOrAfter(Version.V_2_18_0)) {
searchPipeline = in.readOptionalString();
}
Copy link
Collaborator

@msfroh msfroh Sep 20, 2024

Choose a reason for hiding this comment

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

You'll need to do the whole BWC dance, since 2.x is building 2.18.

  1. Do this on main with onOrAfter(Version.V_3_0_0)). Get it merged.
  2. You'll need a manual backport to 2.x, where you do onOrAfter(Version.V_2_18_0). Don't get it merged right away.
  3. Before merging the backport to 2.x, open another PR on main to change it to onOrAfter(Version.V_2_18_0).
  4. Merge the backport PR.
  5. Merge the main version update PR.

We need to do those last two steps as close together as possible, as merging the backport PR will break builds on main.

I hate this process, but we haven't been able to think of something better.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you are right. Been a while changed an API body. Pushed the change and also added one more test for serialization.

Copy link
Contributor

❌ Gradle check result for f64a7cb: 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 f64a7cb: 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: 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 9 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.

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 enhancement Enhancement or improvement to existing feature or request good first issue Good for newcomers Search Search query, autocomplete ...etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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