how i make search for one field exe:
GET /imsva_message/_search
{
"size":0,
"aggs":{
"aggdata":{
"filter":{
"range":{
"data1":{
"from":"now-1h" ,
"to":"now"
}
}
},
"aggs":{
"aggremetente":{
"terms":{
"field":"remetente.keyword",
"min_doc_count":90,
"size":50
}
}
}
}
}
}
this a server response :
{
"took" : 363,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 21535194,
"max_score" : 0.0,
"hits" : [ ]
},
"aggregations" : {
"aggdata" : {
"doc_count" : 20187,
"aggremetente" : {
"doc_count_error_upper_bound" : 6,
"sum_other_doc_count" : 1971,
"buckets" : [
{
"key" : "esa",
"doc_count" : 15526
},
{
"key" : "noreply",
"doc_count" : 483
},
{
"key" : "dcdp.br",
"doc_count" : 240
},
{
"key" : "capibr",
"doc_count" : 234
},
{
"key" : "br",
"doc_count" : 142
}
]
}
}
}
}
i wand to search that more one field ("message_direction"="incoming");