-
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
Adding WithFieldName interface for QueryBuilders with fieldName #15705
Conversation
...rc/main/java/org/opensearch/plugin/correlation/core/index/query/CorrelationQueryBuilder.java
Outdated
Show resolved
Hide resolved
❌ Gradle check result for 089eede: 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? |
71d1cb1
to
9b6f465
Compare
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.
@msfroh - Can you also provide your feedback on this PR?
server/src/main/java/org/opensearch/index/query/MultiTermQueryBuilder.java
Show resolved
Hide resolved
@dzane17 - Can you add CHANGELOG.md for this change? |
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.17 2.17
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.17
# Create a new branch
git switch --create backport/backport-15705-to-2.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f5c897cf1db3d413c6ccd9bcad1284a7873a1556
# Push it to GitHub
git push --set-upstream origin backport/backport-15705-to-2.17
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.17 Then, create a pull request where the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15705 +/- ##
============================================
+ Coverage 71.95% 71.97% +0.01%
- Complexity 64196 64204 +8
============================================
Files 5271 5271
Lines 300171 300171
Branches 43380 43380
============================================
+ Hits 215990 216037 +47
+ Misses 66476 66401 -75
- Partials 17705 17733 +28 ☔ View full report in Codecov by Sentry. |
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]> (cherry picked from commit f5c897c)
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]> (cherry picked from commit f5c897c)
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]> (cherry picked from commit f5c897c)
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]> (cherry picked from commit f5c897c)
… fieldName (#15765) * Adding WithFieldName interface for QueryBuilders with fieldName (#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]> (cherry picked from commit f5c897c) * Update CHANGELOG.md Signed-off-by: Ankit Jain <[email protected]> --------- Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]>
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]> (cherry picked from commit f5c897c)
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]> (cherry picked from commit f5c897c)
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]> (cherry picked from commit f5c897c)
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]> (cherry picked from commit f5c897c)
…) (#15763) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]> (cherry picked from commit f5c897c)
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]>
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]>
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]>
…search-project#15705) Signed-off-by: David Zane <[email protected]> Signed-off-by: Ankit Jain <[email protected]> Co-authored-by: Ankit Jain <[email protected]>
Description
Adding
WithFieldName
interface and update QueryBuilder classes that conform - have afieldName()
implementation.In the Query-Insights plugin, we would like to append
fieldName
andfieldType
data during query shape construction. Some*QueryBuilder
classes already provide afieldName()
method, but not all query types necessarily operate on a single field. Adding theWithFieldName
interface provides a uniform way to type-check any*QueryBuilder
instance and get a singularfieldName
when possible. Also oncefieldName
is known, we can lookupfieldType
via index mappings.Related Issues
Related RFC opensearch-project/query-insights#69
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.