-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add CompositeAggregation#missingBucket #108
Add CompositeAggregation#missingBucket #108
Conversation
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.
Hey @exoego, thanks for the PR. Apart from the review comments, could you also add a test alongside and similar to 👇
elastic-builder/test/aggregations-test/composite-agg-values-sources-test/terms-values-source.test.js
Line 38 in 39c0f90
test(setsOption, 'missing', { param: 42 }); |
Thanks!
@@ -105,6 +105,17 @@ class ValuesSourceBase { | |||
return this; | |||
} | |||
|
|||
/** | |||
* Specifies to include documents without a value for a given source in the |
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.
Change to Specifies whether to include documents without a value for a given source in the response. Defaults to
false (not included).
. Could you also wrap the comment at 80 characters?
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.
Addressed in 96fc517
src/aggregations/bucket-aggregations/composite-agg-values-sources/values-source-base.js
Show resolved
Hide resolved
src/index.d.ts
Outdated
@@ -4655,10 +4655,22 @@ declare namespace esb { | |||
* Missing specifies the value to use when the source finds a missing value | |||
* in a document. | |||
* | |||
* Note: The `missing` option of the composite aggregation is deprecated in | |||
* [Elastticsearch v6.0](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/breaking-changes-6.0.html#_literal_missing_literal_is_deprecated_in_the_literal_composite_literal_aggregation), |
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.
* [Elastticsearch v6.0](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/breaking-changes-6.0.html#_literal_missing_literal_is_deprecated_in_the_literal_composite_literal_aggregation), | |
* [Elasticsearch v6](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/breaking-changes-6.0.html#_literal_missing_literal_is_deprecated_in_the_literal_composite_literal_aggregation), |
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.
Addressed in 96fc517
src/aggregations/bucket-aggregations/composite-agg-values-sources/values-source-base.js
Show resolved
Hide resolved
src/index.d.ts
Outdated
* Note: The `missing` option of the composite aggregation is deprecated in | ||
* [Elastticsearch v6.0](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/breaking-changes-6.0.html#_literal_missing_literal_is_deprecated_in_the_literal_composite_literal_aggregation), |
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.
Could you add this note here as well 👇
Lines 96 to 106 in 39c0f90
/** | |
* Missing specifies the value to use when the source finds a missing value | |
* in a document. | |
* | |
* @param {string} value | |
* @returns {ValuesSourceBase} returns `this` so that calls can be chained | |
*/ | |
missing(value) { | |
this._opts.missing = value; | |
return this; | |
} |
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.
Addressed in 96fc517
2db2f9d
to
849225a
Compare
test/aggregations-test/composite-agg-values-sources-test/terms-values-source.test.js
Outdated
Show resolved
Hide resolved
Thank you @exoego! Changes have been released in |
Addresses one of breking change in ES v6.0.
This PR adds CompositeAggregation#missingBucket.