Search for data block in ElasticSearch -


i have been working elasticsearch new me. logging status messages on external pc send database (this out of reach). collect data giving start , end time make query. challenge me data before query, if make search 17-08-2017 18-08-2017 want see logging happend day before on last hour, cause if change starting date day before query date gives me many results, ideal data block of 200 log rules dynamically changes on scrolling through data. hope question understandable!

not sure if current query relevant, please ask me if want :)

greetings,

bram

you need use scan method available under helpers module. gives cursor(iterator) loop on response.

helpers.scan(es,      query={         "query": {           "range": {             "date_field": {               "gte": "17-08-2017",               "lte": "18-08-2017"              }            }          }      },      index="my-index",      doc_type="my-type" ) 

now can batch response in size of 200 breaking iteration.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -