沙师弟,师父的充电器掉了

帮忙看下这个es查询格式问题在哪?

Elasticsearch | 作者 chaochao6411 | 发布于2019年03月20日 | 阅读数:1420

Array ( [_source] => [scroll] => 1m => 1000 [index] => matomo_es:matomo_archive_numeric_2019_03 [type] => matomo_archive_numeric_2019_03 [body] => Array ( [query] => Array ( [bool] => Array ( [must] => Array ( [0] => Array ( [match] => Array ( [idsite] => 1 ) ) [1] => Array ( [match] => Array ( [date1] => 1552089600 ) ) [2] => Array ( [match] => Array ( [date2] => 1552089600 ) ) [3] => Array ( [match] => Array ( [period] => 1 ) ) [bool] => Array ( [should] => Array ( [0] => Array ( [term] => Array ( [name] => nb_visits ) ) [1] => Array ( [term] => Array ( [name] => nb_visits_converted ) ) [2] => Array ( [terms] => Array ( [name] => Array ( [0] => done [1] => done.VisitsSummary ) ) ) [3] => Array ( [terms] => Array ( [value] => Array ( [0] => 1 [1] => 3 ) ) ) ) ) ) [should] => Array ( ) [filter] => Array ( [range] => Array ( [ts_archived] => Array ( [gte] => 1552147199 ) ) ) ) ) [sort] => Array ( [idarchive] => Array ( [order] => desc ) ) ) )
  
 
想要的查询目的是:   A and B and ((C and D) or  E)
 
1.png 2.png 3.png 4.png
已邀请:

laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net

赞同来自:

转成dsl就可以,通过dsl排查,推荐阅读:https://blog.csdn.net/wojiushi ... 56221

要回复问题请先登录注册