Elastic Search Lucene Query by Time in Python -
i having hardtime querying elastic search using kibana , python pyes library.
https://pyes.readthedocs.org/en/latest/index.html
i need data filtered field time range.
let's want data field _customer_id within time range between 2014-08-17 20:00:00 , 2014-08-17 21:00:00. start can't figure out next.
import pyes pyes.query import filteredquery, matchallquery, boolquery, termquery conn = pyes.es(['87.878.787:9200']) q = termquery("@timestamp", "[2014-08-17t20:00:00 2014-08-17t21:00:00]") results = conn.search(query = q)
if can filtered in kibana, there function show query used on each panel. can work out there how build python query.
Comments
Post a Comment