Aggregation on boolean

Hey there!

I got one index with two types. I want to do a aggragtion query.
This is my query.

GET index1/type1,type2/_search
{
"query": {
"match_all": {}
},
"size" : 0,
"aggs": {
"myaggregation": {
"terms": {
"field": "boolean_field"
}
}
}
}

When I execute this query my results are a bit strange.

"aggregations": {
"myaggregation": {
"buckets": [
{
"key": "F",
"doc_count": 12032
},
{
"key": "T",
"doc_count": 3388
},
{
"key": "0",
"doc_count": 1394
},
{
"key": "1",
"doc_count": 259
}
]
}
}

Why are the aggregations splitted in T,F,0,1 and not combined. F => 0, T =>
1 ???

--
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/88e78d7c-d307-4275-bb57-e8dc5c41af11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sry!
It was caused by different indexes.

Am Montag, 11. August 2014 10:18:25 UTC+2 schrieb Fabian Köstring:

Hey there!

I got one index with two types. I want to do a aggragtion query.
This is my query.

GET index1/type1,type2/_search
{
"query": {
"match_all": {}
},
"size" : 0,
"aggs": {
"myaggregation": {
"terms": {
"field": "boolean_field"
}
}
}
}

When I execute this query my results are a bit strange.

"aggregations": {
"myaggregation": {
"buckets": [
{
"key": "F",
"doc_count": 12032
},
{
"key": "T",
"doc_count": 3388
},
{
"key": "0",
"doc_count": 1394
},
{
"key": "1",
"doc_count": 259
}
]
}
}

Why are the aggregations splitted in T,F,0,1 and not combined. F => 0, T
=> 1 ???

--
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/4ecd8dd9-5fcb-4727-8249-1c3bf0b3f9b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.