KQL笔记

KQL:

{'query': 
{'bool':
{'must': [{'match': {'Sql': 'insert'}}, {'match': {'PolicyName.keyword': 'd8t'}}, {'match': {'Sql': 'into'}}],
'should': [{'term': {'Sql': 'ol_live_student_time_chapter_list'}}, {'term': {'Sql': 'online.ol_live_student_time_chapter_list'}}], 'minimum_should_match': 1,
'filter': {'range': {'Timestamp.keyword': {'lte': '2021-03-30 23:59:39', 'gte': '2021-03-30 00:00:00'}}}}}, 'size': 0,
'aggs': {'aggr_mame': {'terms': {'field': 'User.keyword', 'size': 2000}, 'aggs': {'aggr_der': {'terms': {'field': 'PolicyName.keyword'},
'aggs': {'top_tag_hits': {'top_hits': {'size': 1}}}}}}}}

 

 must的意思是当前值必须是有的,must_not必须没有,should表示数据可以有也可以没有

原文地址:https://www.cnblogs.com/zping/p/14601834.html