Elasticsearch: filter or get value out of aggregation bucket -


In flexible detection, I have an index with the number of requests for a document with timestamps and a webservice.

I would like to get an aggregation to receive every day, where maximum requests were seen (peak hours).

I am successful in achieving results by executing the following request: {"Aggregations": {"week_summary": {"filter": {"Category": {"@timestamp": {"gte" : "": "2015-01-20 || -7d", "lte": "2015-01-20"}}}, "Aggregation": {"oneday_interval": {"date_histogram": {"field": "@timestamp "" "" "": "" "" "" "" "" "," Interval ":" "" "" "," command ": {" _key ":" desc "}}," aggregation ": {" peck_hor_histogram ": {" date_hostogram ": {" field ":" @stimestamp "," Interval ":" 1h "," order ": {" Peak_request_count.value ":" desc "}}," Aggregations ": {" Peak_request_count ": {" sum ": {" field ":" request_count "}}}} }}}}}, Size: 0}

it's okay in a sense Is:

do

However, I do not need all the other bucket items, because peak Ohora_aitogram bucket is really very similar to the first item peak hours, sir.

(i.e. the second 23 hours of the day), and I only want to get the first item.

NB: In case of real use, my aggregation is returning about 3 MB of data, so it is important to filter all those useless values.

Thank you for your reply.

I think it will be a feature that needs your answer: starting with this :


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -