Skip to content

Conversation

@csoulios
Copy link
Contributor

@csoulios csoulios commented Nov 4, 2020

Backports #64503 to 7.x

Bucket aggregations compute bucket doc_count values by incrementing the doc_count by 1 for every document collected in the bucket.

When using summary fields (such as aggregate_metric_double) one field may represent more than one document. To provide this functionality we have implemented a new field mapper (named doc_count field mapper). This field is a positive integer representing the number of documents aggregated in a single summary field.

Bucket aggregations will check if a field of type doc_count exists in a document and will take this value into consideration when computing doc counts.

csoulios and others added 2 commits November 4, 2020 16:21
Bucket aggregations compute bucket doc_count values by incrementing the doc_count by 1 for every document collected in the bucket.

When using summary fields (such as aggregate_metric_double) one field may represent more than one document. To provide this functionality we have implemented a new field mapper (named doc_count field mapper). This field is a positive integer representing the number of documents aggregated in a single summary field.

Bucket aggregations will check if a field of type doc_count exists in a document and will take this value into consideration when computing doc counts.
@javanna
Copy link
Member

javanna commented Nov 5, 2020

heya, heads up that you will need to adapt the valueFetcher method to take a QueryShardContext instead MapperService as argument, following #64524 . Our streams have crossed in master and it caused an interesting situation where both our builds were green yet the code after the two merges would not compile :)

@csoulios
Copy link
Contributor Author

csoulios commented Nov 5, 2020

@elasticmachine run elasticsearch-ci/bwc
@elasticmachine run elasticsearch-ci/default-distro

@csoulios
Copy link
Contributor Author

csoulios commented Nov 6, 2020

@elasticmachine run elasticsearch-ci/bwc

@csoulios csoulios merged commit e1d7b4f into elastic:7.x Nov 6, 2020
@csoulios csoulios deleted the doc_count-field-mapper-7.x branch November 6, 2020 09:54
csoulios added a commit to csoulios/elasticsearch that referenced this pull request Nov 6, 2020
After merging _doc_count PR in 7.x (elastic#64594), we can enable
the skipped ML dataframe analytics.

Those tests had been broken after merging elastic#64503 in master
csoulios added a commit that referenced this pull request Nov 6, 2020
After merging _doc_count PR in 7.x (#64594), we can enable
the skipped ML dataframe analytics.

Those tests had been broken after merging #64503 in master
csoulios added a commit that referenced this pull request Dec 3, 2020
After merging _doc_count field type in v7.11.0 (#64594), this PR lowers the minimum compatibility
version from v8.0.0 to v7.11.0

Relates to #64503
csoulios added a commit that referenced this pull request Dec 3, 2020
After merging _doc_count field type in v7.11.0 (#64594), this PR lowers the minimum compatibility
version from v8.0.0 to v7.11.0

Relates to #64503
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants