-
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Our current need is only around aggregations, so a hook into ToAggregations at the repo level would work as well, but seems like it would be nice to have something a little bit higher up in the stack as well. An example of our exact situation is ....
Field abc.def.xyz is actually mapped into a nested field with parent abc and a filter of pivotField:def, so what the user sends in as a terms aggregation terms:abc.def.xyz actually yields an Elastic agg structure of ....
"nested_abc.def.xyz": {
"aggs": {
"filtered_abc.def.xyz": {
"aggs": {
"terms_abc.def.xyz": {
"terms": {
"field": "search.abc.xyz"
}
}
},
"filter": {
"term": {
"search.abc.pivotField": {
"value": "def"
}
}
}
}
},
"nested": {
"path": "search.abc"
}
}
We need to roll the actual terms agg result (terms_abc.def.xyz) up 2 levels to where the consumer would have expected it without the nested trickery. Would be great to be able to do that globally at the repo level with a simple hook.
Metadata
Metadata
Assignees
Labels
No labels