Which SearchType will allow the aggregation during the searchScroll


(Rajadurai) #1

Version: elasticsearch-1.1.2
Client : JEST
I am using aggregation for getting the terms count.i have a scenario in which i need aggregation along with scrolling feature.But currently scrolling is not supported in aggregation.so is their any way to implement aggregation along with scrolling.

Below is the sample query :

{
"query" : {
"filtered" : {
"query" : {
"match_all" : { }
},
"filter" : {
"and" : {
"filters" : [ {
"and" : {
"filters" : [ {
"or" : {
"filters" : [ {
"query" : {
"match" : {
"status" : {
"query" : "51",
"type" : "boolean"
}
}
}
}, {
"query" : {
"match" : {
"status" : {
"query" : "52",
"type" : "boolean"
}
}
}
} ]
}
} ]
}
},
}
}
}
},
"fields" : [ "docId", "status", "rcvdDateTime", "docTypeCde", "acctNum", "busFuncCde", "inputSrc", "docDesc" ],
"sort" : [ {
"docDesc" : {
"order" : "desc"
}
} ],
"aggregations" : {
"status" : {
"terms" : {
"field" : "status",
"size" : 10,
"order" : {
"_count" : "asc"
}
}
},
"inputSrc" : {
"terms" : {
"field" : "inputSrc",
"size" : 10,
"order" : {
"_count" : "asc"
}
}
}
}
}

Earlier i have used Facet to get the terms count which also worked fine with the scrolling, since Facet has been deprecated in the updated versions of elastic search how to handle scrolling along with the aggregation.


(system) #2