Have you tried the usual sub-aggregations? It looks like it should do 
exactly what you want. If so, why does that not work? Can you include some 
sample data and queries you have tried so that we can index it and try your 
queries?

"Bucketing aggregations can have sub-aggregations (bucketing or metric). 
The sub-aggregations will be computed for the buckets which their parent 
aggregation generates."
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations.html


On Friday, October 24, 2014 12:17:04 PM UTC-7, Jay Hilden wrote:
>
> I have an ES type with a nested KeyValuePair type.  What I'm trying to do 
> is a terms aggregation on both the key and value fields such that I'd get 
> the following results:
>
> Key1 - Value1: DocCount = 10
> Key1 - Value2: DocCount = 9
> Key2 - Value3: DocCount = 4
>
> Here is my mapping:
> {
> "index123" : {
> "mappings" : {
> "type123" : {
> "properties" : {
> "authEventID" : {
> "type" : "long"
> },
> "authInput" : {
> "properties" : {
> "uIDExtensionFields" : {
> "type" : "nested",
> "properties" : {
> "key" : {
> "type" : "string"
> },
> "value" : {
> "type" : "string"
> }
> }
> }
> }
> }
> }
> }
> }
> }
> }
>
> Is there a way to do this?
>
> Thank you.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/5415a7f5-31ea-4085-af3a-0bbbdc875ea9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to