-
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
[Search Pipelines] Support ad hoc pipelines #7253
[Search Pipelines] Support ad hoc pipelines #7253
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
bbd7c90
to
9469e77
Compare
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/action/search/TransportSearchAction.java
Outdated
Show resolved
Hide resolved
This change allows a search pipeline to be defined within a search request body. This will take precedence over any other search pipeline, and allows ad hoc testing of pipeline configurations before persisting the pipeline definition in cluster state. Signed-off-by: Michael Froh <froh@amazon.com>
9469e77
to
c0bdd3d
Compare
server/src/main/java/org/opensearch/search/pipeline/SearchPipelineService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/Pipeline.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/Pipeline.java
Outdated
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/search/pipeline/Pipeline.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/Pipeline.java
Outdated
Show resolved
Hide resolved
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #7253 +/- ##
============================================
- Coverage 70.60% 70.56% -0.04%
+ Complexity 59582 59489 -93
============================================
Files 4877 4878 +1
Lines 285806 285844 +38
Branches 41165 41175 +10
============================================
- Hits 201787 201713 -74
- Misses 67446 67460 +14
- Partials 16573 16671 +98
|
1. Create all streams in try-with-resources. 2. Keep methods in Pipeline package-private. 3. Remove spurious character in CHANGELOG. Also, I remembered that in a future change, I'm going to call the no-op pipeline "_none" (like when bypassing an ingest pipeline) so I should name it "_none" from the start. Signed-off-by: Michael Froh <froh@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
@andrross mind to take a look? thank you! ;-) |
...ine-common/src/yamlRestTest/resources/rest-api-spec/test/search_pipeline/30_filter_query.yml
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/PipelinedRequest.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/PipelinedRequest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/PipelinedRequest.java
Outdated
Show resolved
Hide resolved
- Added opensearch.internal annotation to PipelinedRequest. - Made PipelinedRequest final. - Removed TODO from PipelinedRequest. - Moved changelog entry to 2.x. Signed-off-by: Michael Froh <froh@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-7253-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c43d7138636023315605f8a4caf91cf407c8753a
# Push it to GitHub
git push --set-upstream origin backport/backport-7253-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x Then, create a pull request where the |
* [Search Pipelines] Support ad hoc pipelines This change allows a search pipeline to be defined within a search request body. This will take precedence over any other search pipeline, and allows ad hoc testing of pipeline configurations before persisting the pipeline definition in cluster state. Signed-off-by: Michael Froh <froh@amazon.com> * Added changelog entry Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate feedback from @reta Resolve + transform request into PipelinedRequest, then use that to transform the search response. Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate more feedback from @reta 1. Create all streams in try-with-resources. 2. Keep methods in Pipeline package-private. 3. Remove spurious character in CHANGELOG. Also, I remembered that in a future change, I'm going to call the no-op pipeline "_none" (like when bypassing an ingest pipeline) so I should name it "_none" from the start. Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate feedback from @andrross - Added opensearch.internal annotation to PipelinedRequest. - Made PipelinedRequest final. - Removed TODO from PipelinedRequest. - Moved changelog entry to 2.x. Signed-off-by: Michael Froh <froh@amazon.com> --------- Signed-off-by: Michael Froh <froh@amazon.com> (cherry picked from commit c43d713)
* [Search Pipelines] Support ad hoc pipelines This change allows a search pipeline to be defined within a search request body. This will take precedence over any other search pipeline, and allows ad hoc testing of pipeline configurations before persisting the pipeline definition in cluster state. Signed-off-by: Michael Froh <froh@amazon.com> * Added changelog entry Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate feedback from @reta Resolve + transform request into PipelinedRequest, then use that to transform the search response. Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate more feedback from @reta 1. Create all streams in try-with-resources. 2. Keep methods in Pipeline package-private. 3. Remove spurious character in CHANGELOG. Also, I remembered that in a future change, I'm going to call the no-op pipeline "_none" (like when bypassing an ingest pipeline) so I should name it "_none" from the start. Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate feedback from @andrross - Added opensearch.internal annotation to PipelinedRequest. - Made PipelinedRequest final. - Removed TODO from PipelinedRequest. - Moved changelog entry to 2.x. Signed-off-by: Michael Froh <froh@amazon.com> --------- Signed-off-by: Michael Froh <froh@amazon.com> (cherry picked from commit c43d713)
* [Search Pipelines] Support ad hoc pipelines (#7253) * [Search Pipelines] Support ad hoc pipelines This change allows a search pipeline to be defined within a search request body. This will take precedence over any other search pipeline, and allows ad hoc testing of pipeline configurations before persisting the pipeline definition in cluster state. Signed-off-by: Michael Froh <froh@amazon.com> * Added changelog entry Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate feedback from @reta Resolve + transform request into PipelinedRequest, then use that to transform the search response. Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate more feedback from @reta 1. Create all streams in try-with-resources. 2. Keep methods in Pipeline package-private. 3. Remove spurious character in CHANGELOG. Also, I remembered that in a future change, I'm going to call the no-op pipeline "_none" (like when bypassing an ingest pipeline) so I should name it "_none" from the start. Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate feedback from @andrross - Added opensearch.internal annotation to PipelinedRequest. - Made PipelinedRequest final. - Removed TODO from PipelinedRequest. - Moved changelog entry to 2.x. Signed-off-by: Michael Froh <froh@amazon.com> --------- Signed-off-by: Michael Froh <froh@amazon.com> (cherry picked from commit c43d713) * Lower back-compatibility check to 2.8.0 Signed-off-by: Michael Froh <froh@amazon.com> --------- Signed-off-by: Michael Froh <froh@amazon.com>
* [Search Pipelines] Support ad hoc pipelines This change allows a search pipeline to be defined within a search request body. This will take precedence over any other search pipeline, and allows ad hoc testing of pipeline configurations before persisting the pipeline definition in cluster state. Signed-off-by: Michael Froh <froh@amazon.com> * Added changelog entry Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate feedback from @reta Resolve + transform request into PipelinedRequest, then use that to transform the search response. Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate more feedback from @reta 1. Create all streams in try-with-resources. 2. Keep methods in Pipeline package-private. 3. Remove spurious character in CHANGELOG. Also, I remembered that in a future change, I'm going to call the no-op pipeline "_none" (like when bypassing an ingest pipeline) so I should name it "_none" from the start. Signed-off-by: Michael Froh <froh@amazon.com> * Incorporate feedback from @andrross - Added opensearch.internal annotation to PipelinedRequest. - Made PipelinedRequest final. - Removed TODO from PipelinedRequest. - Moved changelog entry to 2.x. Signed-off-by: Michael Froh <froh@amazon.com> --------- Signed-off-by: Michael Froh <froh@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
This change allows a search pipeline to be defined within a search request body. This will take precedence over any other search pipeline, and allows ad hoc testing of pipeline configurations before persisting the pipeline definition in cluster state.
The new search source field is gated behind the search pipelines feature flag. Also, serialization of the field is gated behind a 3.0 version check. I don't think we should backport to the 2.x branch before we release 2.7. I think we'll want to update that version check to 2.8.
Issues Resolved
#6717
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.