Range query elasticsearch -


i have written following query data elasticsearch

searchrequest requestquery =             requests.searchrequest(constantsvalue.indexname)             .types(constantsvalue._type)             .source("{size:999999,"                     + "\"_source\" : "                     + "[\"dtcreated\", \"status\"]"                     + ",\"aggs\": "                     + "{\"group_by_status\": {\"terms\": {\"field\": \"status\"},"                     + "\"aggs\" : "                     + "{\"group_by_date\" : {\"date_histogram\" : "                     + "{\"field\" : \"dtcreated\", \"interval\" : \"day\","                     + "\"format\" : \"yyyy-mm-dd\" },"                     + "\"aggs\" : "                     + "{\"grades_count\" : { \"value_count\" : { \"field\" : \"status\" } }}}}}}}"); 

this query gives me day wise count of status. want add date range lets 2016-09-01t18:30:00.000z 2016-10-01t18:30:00.000z. want daily status count date range. have tried best not found answer. appreciated


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -