I want to know if I can access parent key in subaggregation, as
{
"size": 0,
"aggs":{
"*agg1*":{
"terms":{
"field":"memberId"
},
"aggs":{
"11":{
"terms":{
"field":"*agg1*._value"
}
}
}
}
}
}
The above script dont seems to be working, I want to know if any script
exists..
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fb7eb444-55d7-4a1c-bbef-4834609c03a1%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
jpountz
(Adrien Grand)
April 24, 2014, 8:45pm
2
Unfortunately, it is not possible. Aggregations can only aggregate values
that are contained in your documents. The reason is that aggregations are
computed on the fly, so the results of agg1
are still partial while
results of 11
are being built. The only exception to this rule is
sorting: you can sort the buckets of an aggregation according to the value
of a sub-aggregation[1]. It is possible because the sorting phase happens
after all buckets have bee computed.
[1]
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
On Wed, Apr 23, 2014 at 7:00 PM, Rabin Acharya rbnacharya@gmail.com wrote:
I want to know if I can access parent key in subaggregation, as
{
"size": 0,
"aggs":{
"*agg1*":{
"terms":{
"field":"memberId"
},
"aggs":{
"11":{
"terms":{
"field":"*agg1*._value"
}
}
}
}
}
}
The above script dont seems to be working, I want to know if any script
exists..
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/fb7eb444-55d7-4a1c-bbef-4834609c03a1%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/fb7eb444-55d7-4a1c-bbef-4834609c03a1%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout .
--
Adrien Grand
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7_7DxdhagKdxZh%3DBLXQv4C%2BY3ZQS2aQLp0ROK-7fxWAg%40mail.gmail.com .
For more options, visit https://groups.google.com/d/optout .