Skip to content

[ESRTEST-31237] Add 'missing' to Elasticsearch's Terms aggregation - #77

Merged
sergio-bobillier merged 1 commit into
masterfrom
sb-ESRTEST-31237-add-missing-param-to-terms-aggregation
Sep 2, 2026
Merged

sergio-bobillier merged 1 commit into
masterfrom
sb-ESRTEST-31237-add-missing-param-to-terms-aggregation

Conversation

@sergio-bobillier

@sergio-bobillier sergio-bobillier commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a missing parameter to Elasticsearch's Terms aggregation. The parameter allows the user to specify a value to be used for documents that do not have the field being aggregated.

Without specifying a missing value, documents without the field are excluded from the aggregation. So, this parameter is required if one wants to prevent the exclusion of said documents.

Note: To avoid RuboCop's Metrics/ParameterLists and Reek's LongParameterList warnings in the Aggregations class, the keyword arguments for the #terms method are being shortened to **params. This is not done in the Terms class' #initialize method in order to retain Ruby's validation of the keywords.

Adds a 'missing' parameter to Elasticsearch's Terms aggregation. The
parameter allows the user to specify a value to be used for documents
that do not have the field being aggregated.

Without specifying a 'missing' value, documents without the field are
excluded from the aggregation. So, this parameter is required if one
wants to prevent the exclusion of said documents.

Note: To avoid RuboCop's Metrics/ParameterLists and Reek's
LongParameterList warnings in the Aggregations class, the keyword
arguments for the #terms method are being shortened to **params. This is
not done in the Terms class's #initialize method in order to retain
Ruby's validation of the keywords.
@sergio-bobillier
sergio-bobillier merged commit 60a38ad into master Sep 2, 2026
2 checks passed
@sergio-bobillier
sergio-bobillier deleted the sb-ESRTEST-31237-add-missing-param-to-terms-aggregation branch September 2, 2026 11:20
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