opensearch-project / opensearch-ruby

Ruby Client for OpenSearch
Apache License 2.0
93 stars 47 forks source link

[FEATURE] Add option_method `missing` to aggregation #216

Closed HolyWalley closed 5 months ago

HolyWalley commented 9 months ago

Is your feature request related to a problem?

Currently aggregation DSL does not support (or does it?) missing option. In my case, I needed it for histogram aggregation, but it looks like it's might (?) be applied to any bucket aggregation.

What solution would you like?

It would be nice to have it

What alternatives have you considered?

Currently I wrote a refinement which specifically defines missing method to histogram aggregation, but it might make sense to do it for all (or, if not all aggregations support it, just to those, which does).

In both cases I can open a PR, just if we decide to add it to only particular ones, I'll need a list of those, which supports it (I'm quite new to open search)

nhtruong commented 5 months ago

I believe it does https://github.com/opensearch-project/opensearch-ruby/blob/main/lib/opensearch/dsl/search/aggregations/missing.rb#L31-L50

Did this file not load for you for some reason?

HolyWalley commented 5 months ago

Hey, thanks for the response I checked and we use 2.1.0, will try to understand why and maybe update