Hello,

I'm new with ES and I'm trying to retrieve aggreated data by term, I have 
something like:

{"total": 10,"product": 1,"campaign": 1},
{"total": 10,"product": 1,"campaign": 2},
{"total": 10,"product": 1,"campaign": 1},
{"total": 10,"product": 2,"campaign": 1}

So, this is my facet:

    "x": {
      "terms_stats": {
        "key_field": [
          "product",
          "campaign"
        ],
        "value_field": "total"
      }

This is the result:

[
{
term: 1
count: 3
total_count: 3
min: 10
max: 10
total: 30
mean: 10
}
{
term: 2
count: 1
total_count: 1
min: 10
max: 10
total: 10
mean: 10
}
]


This information is refered to campaigns, not both product and campaign 
terms. My expectation was something like:

terms: [
{
term: [1,1]
count: 2
total_count: 2
min: 10
max: 10
total: 20
mean: 10
}
{
term: [1,2]
count: 1
total_count: 1
min: 10
max: 10
total: 10
mean: 10
}
{
term: [2,1]
count: 1
total_count: 1
min: 10
max: 10
total: 10
mean: 10
}
]

I don't know if ES has a way to do that. 

Somebody has an idea?

Thanks in advance.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/04860e26-47be-4062-9fcb-128095022a76%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to