-
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
[Star tree] Doc count field support in star tree #15282
[Star tree] Doc count field support in star tree #15282
Conversation
Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15282 +/- ##
============================================
- Coverage 71.95% 71.85% -0.11%
+ Complexity 63266 63216 -50
============================================
Files 5224 5225 +1
Lines 296080 296128 +48
Branches 42764 42771 +7
============================================
- Hits 213054 212770 -284
- Misses 65560 65890 +330
- Partials 17466 17468 +2 ☔ View full report in Codecov by Sentry. |
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.
Thanks @bharath-techie for the change. Gave some high level comments.
I am curious, is it different from _doc_count field that users can provide to ingest pre-aggregated data?
server/src/main/java/org/opensearch/index/codec/composite/Composite99DocValuesWriter.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/codec/composite/Composite99DocValuesWriter.java
Outdated
Show resolved
Hide resolved
...va/org/opensearch/index/compositeindex/datacube/startree/aggregators/DocCountAggregator.java
Outdated
Show resolved
Hide resolved
.../java/org/opensearch/index/compositeindex/datacube/startree/builder/BaseStarTreeBuilder.java
Outdated
Show resolved
Hide resolved
.../java/org/opensearch/index/compositeindex/datacube/startree/builder/BaseStarTreeBuilder.java
Outdated
Show resolved
Hide resolved
.../java/org/opensearch/index/compositeindex/datacube/startree/builder/BaseStarTreeBuilder.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/mapper/StarTreeMapper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/mapper/StarTreeMapper.java
Outdated
Show resolved
Hide resolved
Thanks for early review. PR is technically not in final state , need to add aggregator tests , merge flow tests. Cleaning up the code also is in backlog, will change it to draft state for now till these are done. |
.../org/opensearch/index/compositeindex/datacube/startree/aggregators/CountValueAggregator.java
Outdated
Show resolved
Hide resolved
...va/org/opensearch/index/compositeindex/datacube/startree/aggregators/DocCountAggregator.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/codec/composite/Composite99DocValuesWriter.java
Outdated
Show resolved
Hide resolved
Its the same. If user provides any value, we'll take that value otherwise we'll take '1' as the identity value. Basically this will become the required metric field for all star tree fields and not |
d775c96
to
519c944
Compare
❌ Gradle check result for d775c96: 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? |
519c944
to
6194f05
Compare
❌ Gradle check result for 519c944: 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? |
6194f05
to
b139000
Compare
❌ Gradle check result for 6194f05: 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? |
❕ Gradle check result for eb9695d: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
❌ Gradle check result for b139000: 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? |
Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
…doc_count_mapper_change
b139000
to
d5efcde
Compare
❌ Gradle check result for d5efcde: 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? |
…doc_count_mapper_change
Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
--------- Signed-off-by: Bharathwaj G <bharath78910@gmail.com> (cherry picked from commit 091ab6f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
--------- Signed-off-by: Bharathwaj G <bharath78910@gmail.com> (cherry picked from commit 091ab6f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…15282) --------- Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
…15282) --------- Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
…15282) --------- Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
…15282) --------- Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
Description
In order to show doc count in search response as part of aggregation buckets, we are adding a _doc_count metric to star tree , so each star tree document will be associated with a _doc_count metric field.
By default
_doc_count
metric is added as part of StarTreeField.So
_doc_count
field will be present as part ofmetricDocValueIterators
as part of star tree doc values, which can be read during search aggregations flow.Related Issues
Resolves #15288
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.