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

Allow metadata to be set on AbstractAggregation (#1677) #1678

Closed
wants to merge 1 commit into from
Closed

Allow metadata to be set on AbstractAggregation (#1677) #1678

wants to merge 1 commit into from

Conversation

leflings
Copy link
Contributor

ElasticSearch allows metadata to be set on an aggregation that will be
returned as-is with the aggregation result.

See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/agg-metadata.html

Using setParam generates invalid query, hence these additions. See
#1677

ElasticSearch allows metadata to be set on an aggregation that will be
returned as-is with the aggregation result.

See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/agg-metadata.html

Using `setParam` generates invalid query, hence these additions. See
#1677
/**
* @var array|null Metadata belonging to this aggregation
*/
protected $_meta;
Copy link
Owner

Choose a reason for hiding this comment

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

Do we need a separate _meta key here or could we just use the internal setParam?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After going over the code in AbstractAggregation::toArray() I agree the problem could be solved by using AbstractAggregation::_setRawParam($key, $value).

@leflings
Copy link
Contributor Author

Closing this and opening #1680 instead. Branched from master and using _rawParams

@leflings leflings closed this Oct 21, 2019
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