Skip to content

Add StringStats aggregation#4370

Merged
russcam merged 1 commit into7.xfrom
feature/7x/string-stats-agg
Feb 10, 2020
Merged

Add StringStats aggregation#4370
russcam merged 1 commit into7.xfrom
feature/7x/string-stats-agg

Conversation

@russcam
Copy link
Copy Markdown
Contributor

@russcam russcam commented Feb 6, 2020

This commit adds support for the string_stats aggregation introduced in
Elasticsearch 7.6.0. It is a metric aggregation but does not implement
IMetricAggregation because the type of Missing field is a string and not a
double value. Missing is implemented as object as the hierarchy of
metric aggregations will be changed as part of #4332, and Missing
will be an object.

The documentation for StringStats indicates that the distribution is returned
in descending probability order, but are modelled as a JSON object. Following
internal discussion, this is modelled as a dictionary on the response as it is
considered this modelling will not diminish functionality.

Closes #4369

This commit adds support for the string_stats aggregation introduced in
Elasticsearch 7.6.0. It is a metric aggregation but does not implement
IMetricAggregation because the type of Missing field is a string and not a
double value. Missing is implemented as object as the hierarchy of
metric aggregations will be changed as part of #4332, and Missing
will be an object.

The documentation for StringStats indicates that the distribution is returned
in descending probability order, but are modelled as a JSON object. Following
internal discussion, this is modelled as a dictionary on the response as it is
considered this modelling will not diminish functionality.

Closes #4369
@russcam russcam mentioned this pull request Feb 6, 2020
{
// string stats aggregation
var minLength = reader.ReadInt32();
reader.ReadNext(); // ,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments 👍

Copy link
Copy Markdown
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Dictionary is a good middle ground in 7.x

@russcam russcam merged commit cc45fb1 into 7.x Feb 10, 2020
russcam added a commit that referenced this pull request Feb 10, 2020
This commit adds support for the string_stats aggregation introduced in
Elasticsearch 7.6.0. It is a metric aggregation but does not implement
IMetricAggregation because the type of Missing field is a string and not a
double value. Missing is implemented as object as the hierarchy of
metric aggregations will be changed as part of #4332, and Missing
will be an object.

The documentation for StringStats indicates that the distribution is returned
in descending probability order, but are modelled as a JSON object. Following
internal discussion, this is modelled as a dictionary on the response as it is
considered this modelling will not diminish functionality.

Closes #4369

(cherry picked from commit cc45fb1)
@russcam
Copy link
Copy Markdown
Contributor Author

russcam commented Feb 10, 2020

ported to master 9917ff6

@Mpdreamz Mpdreamz deleted the feature/7x/string-stats-agg branch February 10, 2020 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants