-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 pipeline] Add script processor #7607
[Search pipeline] Add script processor #7607
Conversation
Gradle Check (Jenkins) Run Completed with:
|
01485ca
to
2e8b828
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
7b71bd6
to
499f0d5
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
9849595
to
1e561d8
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
77c276c
to
a75fe42
Compare
Gradle Check (Jenkins) Run Completed with:
|
a75fe42
to
c04f202
Compare
Gradle Check (Jenkins) Run Completed with:
|
...h-pipeline-common/src/yamlRestTest/resources/rest-api-spec/test/search_pipeline/10_basic.yml
Outdated
Show resolved
Hide resolved
It's a good point - we shouldn't include opensearch-specific classes as dependencies of painless syntax. So there are at least two routes to go on the read path: 1. return their primitive representations 2. does not support reading neither. It's worth for community discussion via an RFC and I removed all non-primitive types support in this PR. |
c04f202
to
4ca4f48
Compare
Signed-off-by: Louis Chu <[email protected]>
4ca4f48
to
1dfe800
Compare
Gradle Check (Jenkins) Run Completed with:
|
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-7607-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 959910b977eb9d005e11b00721a233ed90548e5c
# Push it to GitHub
git push --set-upstream origin backport/backport-7607-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 |
Be able to insert a painless or mustache script to manipulate search requests. Signed-off-by: Louis Chu <[email protected]> (cherry picked from commit 959910b) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Be able to insert a painless or mustache script to manipulate search requests. (cherry picked from commit 959910b) Signed-off-by: Louis Chu <[email protected]>
Be able to insert a painless or mustache script to manipulate search requests. Signed-off-by: Louis Chu <[email protected]> Signed-off-by: Bharathwaj G <[email protected]>
Be able to insert a painless or mustache script to manipulate search requests. Signed-off-by: Louis Chu <[email protected]>
Be able to insert a painless or mustache script to manipulate search requests. Signed-off-by: Louis Chu <[email protected]>
Be able to insert a painless or mustache script to manipulate search requests. Signed-off-by: Louis Chu <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
Because the script processor is quite flexible, the design should be cautious about the range of fields that it may read and modify. One approach to managing request/response context is utilizing Java's classloader and field dynamically at runtime. The key advantage of this method is its flexibility, providing a general solution adaptable to various contexts. However, its broad applicability can also be a liability, as it could inadvertently create security vulnerabilities unless explicitly disabled. Alternatively, an explicit field check offers more control and security by only supporting specific fields. While this approach reduces the risk of security breaches, it requires developers to add support on new fields. The recommandation is approach two and iterate with community engagement
Search source fields for request
https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/search/builder/SearchSourceBuilder.java
Table for Search Request script processor supports (Not final decision. Iterating and looking for community feedback)
Related Issues
#6712
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.