-
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
Extract all used fields from QueryStringQueryBuilder #6020
Conversation
4060d0c
to
4727bb2
Compare
Gradle Check (Jenkins) Run Completed with:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6020 +/- ##
============================================
- Coverage 71.41% 70.84% -0.57%
+ Complexity 59397 58760 -637
============================================
Files 4923 4771 -152
Lines 279212 280863 +1651
Branches 40595 40571 -24
============================================
- Hits 199408 198989 -419
- Misses 63223 65557 +2334
+ Partials 16581 16317 -264 ☔ View full report in Codecov by Sentry. |
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/index/query/QueryStringQueryBuilder.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/search/QueryStringQueryParser.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/search/QueryStringQueryParser.java
Outdated
Show resolved
Hide resolved
Apologies. This PR was auto closed without reaching a resolution from the maintainers. |
Compatibility status:Checks if related components are compatible with change 2616db2 Incompatible componentsIncompatible components: [https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/performance-analyzer-rca.git] Skipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/k-nn.git] |
Gradle Check (Jenkins) Run Completed with:
|
@petardz Is this being worked upon? Pls free to reach out to maintainers for further reviews. |
Hi @petardz, do we have any updates? |
This was gonna be useful for ISM plugin for Rollup feature where field names are getting rewritten. Currently, ISM is copying over bunch of code from QSQ implementation from core. Also, this could be useful for Alerting plugin too. Currently, Alerting is copying over mappings from source index to query index for ALL fields, but it could be copying only ones used in percolate queries, if parsing query fields would be trivial. @bowenlan-amzn @sbcd90 @praveensameneni @getsaurabh02 if you still find this useful I could rebase this PR. |
return queryParser; | ||
} | ||
|
||
public Set<String> extractAllUsedFields(QueryShardContext context) { |
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.
We need comment for this method. What it's used for and how it can be used.
@sbcd90 @praveensameneni I belive Subho worked on this before, can do a review. |
Signed-off-by: Petar Dzepina <[email protected]>
Signed-off-by: Petar Dzepina <[email protected]>
Signed-off-by: Petar Dzepina <[email protected]>
Signed-off-by: Petar Dzepina <[email protected]>
8738485
to
2616db2
Compare
❌ Gradle check result for 2616db2: 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? |
It seems like this contribution is stalled. I would recommend we close it for now. @peternied could you close this for us? Thanks |
Thanks for the mention @scrawfor99 but this is a little outside my experience. @eirsep @sbcd90 @praveensamenen @bowenlan-amzn Maybe one of you could weight in on what you think should happen next for this PR? Is this something one of you would want to drive to completion? |
This PR is stalled because it has been open for 30 days with no activity. |
Signed-off-by: Petar Dzepina [email protected]
Description
We recently implemented rewriting of fields used in QueryStringQueryBuilder in ISM and we had to copy over substantial amount of code from core in ISM. To avoid this code duplication and future maintenance, we could extend core's QueryStringQueryBuilder to provide method for extracting all fields which are used in final query.
Also in Alerting we would have use-case for this, where if we could grab all fields used in queries, we could just copy mappings to percolate index only for those fields.
Issues Resolved
#6019
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.