ruflin/Elastica — pull request #619 by krzaczek (2014-05-23 11:49:06+00:00)
Title: Aggragations/Filter - fix for es1.2 when no sub aggregations

Hi,

Small fix for Elastica/Aggregation/Filter.php. There is a bug when no subaggregation is set ... see "by_category_feature"
```json
"aggs": {
"global": {
"global": {},
"aggs": {
"by_category_feature": {
"filter": {
"match_all": {}
},
"aggs": []
}
}
}
}
```
This will cause an error in elasticsearch because "aggs" cannot be [] ... it should be {} .. or we can just omit the aggs when there are none present.

```json
"aggs": {
"global": {
"global": {},
"aggs": {
"by_category_feature": {
"filter": {
"match_all": {}
}
}
}
}
}
```

This will work fine :)