'[match] malformed query, expected [END_OBJECT] but found [FIELD_NAME]')
解决方法:
改之前:
def query_one(subject_id,start_time,end_time):
query1 ={"query":{"match":{"subject_id":subject_id}},"size": 10000}
# if start_time or end_time:
# ts = {}
# if start_time: ts['gte'] = int(start_time)
# if end_time: ts['lte'] = int(end_time)
# query1["query"]["bool"]={'must':[{"range": {"timestamp": ts}}]}
doc = es.search(index='event_14', doc_type='koala-index', body=query1)
# return doc['aggregations']['gr