-
Notifications
You must be signed in to change notification settings - Fork 114
Add cartesian_bounds, cartesian_centroid and change_point aggregations #5418
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,8 @@ import { | |
AverageAggregation, | ||
BoxplotAggregation, | ||
CardinalityAggregation, | ||
CartesianBoundsAggregation, | ||
CartesianCentroidAggregation, | ||
ExtendedStatsAggregation, | ||
GeoBoundsAggregation, | ||
GeoCentroidAggregation, | ||
|
@@ -87,6 +89,7 @@ import { | |
BucketScriptAggregation, | ||
BucketSelectorAggregation, | ||
BucketSortAggregation, | ||
ChangePointAggregation, | ||
CumulativeCardinalityAggregation, | ||
CumulativeSumAggregation, | ||
DerivativeAggregation, | ||
|
@@ -183,13 +186,32 @@ export class AggregationContainer { | |
* @ext_doc_id search-aggregations-metrics-cardinality-aggregation | ||
*/ | ||
cardinality?: CardinalityAggregation | ||
/** | ||
* A metric aggregation that computes the spatial bounding box containing all values for a Point or Shape field. | ||
* @ext_doc_id search-aggregations-metrics-cartesian-bounds-aggregation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe you need an entry in specification/_doc_ids/table.csv for |
||
*/ | ||
cartesian_bounds?: CartesianBoundsAggregation | ||
/** | ||
* A metric aggregation that computes the weighted centroid from all coordinate values for point and shape fields. | ||
* @ext_doc_id search-aggregations-metrics-cartesian-centroid-aggregation | ||
*/ | ||
cartesian_centroid?: CartesianCentroidAggregation | ||
/** | ||
* A multi-bucket aggregation that groups semi-structured text into buckets. | ||
* @ext_doc_id search-aggregations-bucket-categorize-text-aggregation | ||
* @availability stack stability=experimental | ||
* @availability serverless stability=experimental | ||
*/ | ||
categorize_text?: CategorizeTextAggregation | ||
/** | ||
* A sibling pipeline that detects, spikes, dips, and change points in a metric. | ||
* Given a distribution of values provided by the sibling multi-bucket aggregation, | ||
* this aggregation indicates the bucket of any spike or dip and/or the bucket at which | ||
* the largest change in the distribution of values, if they are statistically significant. | ||
l-trotta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* There must be at least 22 bucketed values. Fewer than 1,000 is preferred. | ||
* @ext_doc_id search-aggregations-change-point-aggregation | ||
*/ | ||
change_point?: ChangePointAggregation | ||
/** | ||
* A single bucket aggregation that selects child documents that have the specified type, as defined in a `join` field. | ||
* @ext_doc_id search-aggregations-bucket-children-aggregation | ||
|
@@ -245,6 +267,7 @@ export class AggregationContainer { | |
/** | ||
* A bucket aggregation which finds frequent item sets, a form of association rules mining that identifies items that often occur together. | ||
* @ext_doc_id search-aggregations-bucket-frequent-item-sets-aggregation | ||
* @aliases frequent_items | ||
*/ | ||
frequent_item_sets?: FrequentItemSetsAggregation | ||
/** | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could decide to make this an enum with
increasing
anddecreasing
values: https://github.com/elastic/elasticsearch/blob/414972d5c7f65fec11c9ac2b4f6c0baaf456abdc/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/aggs/changepoint/ChangeDetector.java#L482Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this case I was referring to https://github.com/elastic/elasticsearch/blob/f9c72c17d18859e3511bd17fbff759ebe965b812/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/aggs/changepoint/ChangeType.java#L254, which is what's used by the response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I noticed
trend
is a string in the server code, but in practice, there are only two values. Well, it's an implementation detail, so it's likely better not to rely on it. You're right.