Skip to content
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

SamplerAggregation contains fields that are no longer present in the ES counterpart #1251

Closed
panychek opened this issue Dec 11, 2019 · 1 comment
Milestone

Comments

@panychek
Copy link

Which version of Elastic are you using?

elastic.v7 (for Elasticsearch 7.x)
elastic.v6 (for Elasticsearch 6.x)

Please describe the expected behavior

The maxDocsPerValue and executionHint fields do not belong here. The Sampler aggregation was broken into 2 different aggs in v5.0, and the diversity part was moved to the Diversified Sampler aggregation.

Any steps to reproduce the behavior?

For example, this:

agg := elastic.NewSamplerAggregation().MaxDocsPerValue(2);
childAgg := elastic.NewSumAggregation().Field("some_field");
agg.SubAggregation("sub_agg", childAgg);

will result in:

Error 400 (Bad Request): Unsupported property "max_docs_per_value" for aggregation "agg [type=parsing_exception]

The same goes for execution_hint

@olivere olivere added this to the 7.0.30 milestone Sep 22, 2021
@olivere
Copy link
Owner

olivere commented Sep 22, 2021

Yes, removed them. Finally.

houz42 pushed a commit to supremind/elastic that referenced this issue Oct 8, 2021
Both `max_docs_per_value` as well as `execution_hint` no longer exist in
v7.

Close olivere#1251
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

No branches or pull requests

2 participants