-
Notifications
You must be signed in to change notification settings - Fork 187
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
[FEATURE] Multi Terms Aggregation has no option to add missing field value. #973
Comments
Hello, |
I'm not sure that multi_terms supports a Do you have a query you've used on the OpenSearch Dashboards Dev Tools that does work as expected? |
If not then it would be worth opening a feature request on https://github.com/opensearch-project/OpenSearch |
Yes I do have sample on dev tools where I used multi terms aggregation with a missing parameter.
Here simply If the name or mediacode field was missing it was replaced with an empty string. But if I removed the missing parameter, the data was skipped for aggregation if one of the field for it did not exist. |
Elastic search API reference: |
Multiterms Aggregation builder takes a MultiTermsLookUp List as the parameter for terms which has a field function but if the field value is missing for that field, the data is not retuned. Basically there is no missing function which exixts for Terms Aggregation Builder.
A function eaxctly like which is present for TermsAggregation Builder would solve the problem I suppose,
TermsAggregatio Builder has a method to add missing field value but no such method appears to Exist for MultiTerms. Java docs link.
I've tried to use Terms Aggregation Builder but that only takes on field at a time but I want to use multiple terms.
This is the way I am using the multi terms aggregation. But when the 'mediacode' field is missing for a particular document. That creates a problem and data is not returned for that document.
I am further using the multiTerms aggregation to do some calculations like this. :
I have also tried using MissingAggregation Builder but that does not seem to work with multiterms when I'm adding that in my ranking aggregation.
The text was updated successfully, but these errors were encountered: