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表示数据可以有也可以没有

相关文章:

  • 2021-09-24
  • 2021-07-22
  • 2021-06-18
  • 2021-08-30
  • 2021-08-14
  • 2021-10-22
  • 2021-06-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2021-11-18
  • 2021-07-17
相关资源
相似解决方案