How to remove empty buckets aggregation multi field

in es 2.3.3, aggregation multi field using following query string ,
GET /myindex/mysubtype/_search
{
"size": 0,
"query": {
"range": {
"longdate.dateval": {
"gte": "20160101000000",
"lte": "20160601000000"
}
}
},
"aggs": {
"aggs1": {
"terms": {
"field": "_parent",
"size": 5
},
"aggs": {
"aggs2": {
"terms": {
"field": "cardno.raw",
"min_doc_count": 51
}
}
}
}
}
}

the following is result,
{
"took": 668,
"timed_out": false,
"_shards": {
"total": 6,
"successful": 6,
"failed": 0
},
"hits": {
"total": 316275,
"max_score": 0,
"hits": []
},
"aggregations": {
"aggs1": {
"doc_count_error_upper_bound": 99,
"sum_other_doc_count": 315773,
"buckets": [
{
"key": "13304111973020",
"doc_count": 144,
"aggs2": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 18,
"buckets": []
}
},
{
"key": "13411261971",
"doc_count": 115,
"aggs2": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": []
}
},
{
"key": "15321261989051",
"doc_count": 85,
"aggs2": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "1370402197",
"doc_count": 85
}
]
}
},
{
"key": "1330483199007",
"doc_count": 82,
"aggs2": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": []
}
},
{
"key": "1511521604119",
"doc_count": 76,
"aggs2": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "1512527640822",
"doc_count": 76
}
]
}
}
]
}
}
}

the result exists empty buckets , how to remove it. thanks!

You need to clean your data before indexing it.... if a field has no value, and you use Gson for example, initialize the field with null, when converting to JSON, Gson will skip this field. If you are not using Gson, you have to do that yourself before sending the JSON data to ES for indexing.

thanks for reply.
all aggeration field has values,but when count less than some value, the buckets turn empty. only greater than some value the buckets not empty.