I want count of document between particular range.
if i take appstatusid from range 1 to 500 then count of document will be 500.
Document Sample "Indexname" :applicationstatus and unique id which i am inserting is "appstatusid"
[{
"_index": "applicationstatus",
"_type": "data",
"_id": "WaqQ0mEBHleEZM2d53bq",
"_score": 1,
"_source": {
"appstatusid": 1,
"savingsaccountnumber": "06405110003380",
"allotmentcategory": "Incentive",
"iseligible": null,
"@timestamp": "2018-02-26T14:42:44.882Z",
"applicantfullname": "Demo1",
"pacid": "4432451"
}
},
{
"_index": "applicationstatus",
"_type": "data",
"_id": "WaqQ0mEBHleEZM2d53bq",
"_score": 1,
"_source": {
"appstatusid": 2,
"savingsaccountnumber": "06405110003380",
"allotmentcategory": "Incentive",
"iseligible": null,
"@timestamp": "2018-02-26T14:42:44.882Z",
"applicantfullname": "Demo2",
"pacid": "4432451"
}
}]
Query which i have tried
GET _search/_search?size=0
{
"query" : {
"constant_score" : {
"filter" : {
"range" :
{
"appstatusid" :
{
"from" : 1,
"to" : 100000
}
}
}
}
}
}