Skip to content

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

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

[ESRTEST-31237] Add 'missing' to Elasticsearch's Terms aggregation#77
sergio-bobillier wants to merge 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.
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.

1 participant