-
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
[Feature] Expose term frequency in Painless script score context #9081
[Feature] Expose term frequency in Painless script score context #9081
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:
|
7aff647
to
421dabc
Compare
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:
|
server/src/main/java/org/opensearch/index/query/functionscore/TermFrequencyFunction.java
Outdated
Show resolved
Hide resolved
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.
@noCharger - Changes look good! Since @russcam validated the changes, we can get the PR out of draft mode and add some unit tests
server/src/main/java/org/opensearch/index/query/functionscore/TermFrequencyFunction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/query/functionscore/TermFrequencyFunction.java
Outdated
Show resolved
Hide resolved
7278800
to
c7114c9
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
c7114c9
to
854ca55
Compare
Compatibility status:
|
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:
|
Compatibility status:
|
854ca55
to
1c7f13e
Compare
Compatibility status:
|
Gradle Check (Jenkins) Run Completed with:
|
Unable to reproduce on local dev env
|
server/src/main/java/org/opensearch/search/lookup/LeafSearchLookup.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/lookup/LeafSearchLookup.java
Outdated
Show resolved
Hide resolved
@noCharger looks pretty cool, thank you! |
Compatibility status:
|
Gradle Check (Jenkins) Run Completed with:
|
The backport to
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-9081-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5d3633cbecfaa1cdc4fcf5efd5ed1ec603de5081
# Push it to GitHub
git push --set-upstream origin backport/backport-9081-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 |
@noCharger, looks like the 2.x backport failed. Can you please create a manual backport PR? |
…nsearch-project#9081) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]>
https://github.com/opensearch-project/OpenSearch/actions/runs/5946439300/job/16126992801#step:3:33 CONFLICT (content): Merge conflict in CHANGELOG.md |
…nsearch-project#9081) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]> (cherry picked from commit 5d3633c)
…nsearch-project#9081) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]> (cherry picked from commit 5d3633c)
…nsearch-project#9081) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]> (cherry picked from commit 5d3633c)
…) (#9517) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]> (cherry picked from commit 5d3633c)
@noCharger
which feels like the snapshot I have of OpenSearch is pointing to older version where the new interface of ScoreScript.Factory is not present. This blocking the development of features in the K-NN plugin. Validated this by building a local distribution of Opensearch core to run the integration tests. |
@navneet1v Which snapshot does the knn plugin employ? I'd get the snapshot from here: https://artifacts.opensearch.org/snapshots/core/opensearch/version>.-SNAPSHOT/opensearch-min--SNAPSHOT-linux-x64-latest.tar.gz For example, the linux one was created at 4:25 PM PST on 08-23-2023. |
…nsearch-project#9081) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]>
…nsearch-project#9081) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]>
…nsearch-project#9081) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]> Signed-off-by: Gagan Juneja <[email protected]>
…nsearch-project#9081) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]> Signed-off-by: Kiran Reddy <[email protected]>
…nsearch-project#9081) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]> Signed-off-by: Kaushal Kumar <[email protected]>
…nsearch-project#9081) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]> Signed-off-by: Ivan Brusic <[email protected]>
…nsearch-project#9081) Add the following functions in Painless script score context: * termfreq * tf * totaltermfreq * sumtotaltermfreq Each of these maps to a Lucene value source. Signed-off-by: Louis Chu <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
Expose term frequency in Painless script score context.
Related Issues
Original issue - #7558
RFC - #8702
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.