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

Deprecate wrong buckets_path initialization on bucket aggregations #2038

Merged
merged 9 commits into from
Dec 7, 2021

Conversation

deguif
Copy link
Collaborator

@deguif deguif commented Dec 5, 2021

No description provided.

@deguif deguif self-assigned this Dec 5, 2021
@deguif deguif force-pushed the aggregation-buckets-path-deprecations branch 4 times, most recently from a9fe831 to a9e7cb6 Compare December 5, 2021 18:07
@deguif deguif marked this pull request as draft December 5, 2021 18:15
@deguif deguif force-pushed the aggregation-buckets-path-deprecations branch 2 times, most recently from 773deaf to f48cacb Compare December 5, 2021 20:53
@deguif deguif marked this pull request as ready for review December 5, 2021 21:27
@deguif deguif force-pushed the aggregation-buckets-path-deprecations branch from 2e21635 to 5e02bed Compare December 6, 2021 09:15
Copy link
Owner

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Change LGTM.

The comment I left can easily be a follow up PR or ignored.

@@ -19,6 +19,10 @@ public function __construct(string $name, ?string $bucketsPath = null, ?string $

if (null !== $bucketsPath) {
Copy link
Owner

Choose a reason for hiding this comment

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

It seems the top part of the constructor is always shared. Made me wonder if we should extract it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes it's shared by a lot of pipeline aggregation, but there're some exceptions like bucket_script or bucket_selector which accepts an array of buckets paths.
A topic I have in mind for 8.0 version is to review the aggregations classes to separate them in three categories (as described in https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html) pipeline, metric and bucket as they have some difference (for example a pipeline aggregation can't have sub aggregations, ...)

@deguif deguif merged commit 6cb177d into ruflin:master Dec 7, 2021
@deguif deguif deleted the aggregation-buckets-path-deprecations branch December 7, 2021 14:38
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