...
|
...
|
@@ -215,7 +215,7 @@ class MailListV2Es extends Base { |
|
|
if(empty($where['flagged'])){
|
|
|
$query['bool']['must'][] = $this->assignSql($folder);
|
|
|
}else{
|
|
|
$query['bool']['must'][] = $this->assignSql2();
|
|
|
$query['bool']['must'][] = $this->assignSql('收件箱');
|
|
|
}
|
|
|
|
|
|
logs('请求es前');
|
...
|
...
|
@@ -542,15 +542,8 @@ class MailListV2Es extends Base { |
|
|
*/
|
|
|
private function countFlagged($body){
|
|
|
$body['query']['bool']['must'][] = ['term'=>['flagged'=>1]];
|
|
|
$body['query']['bool']['must'][] = $this->assignSql2();
|
|
|
return $this->es->count($body,['aggs' => [
|
|
|
'unique_udate' => [
|
|
|
'terms' => [
|
|
|
'field' => 'udate', // 替换为你的字段名称
|
|
|
'size' => 500 // 设置返回的去重值的数量
|
|
|
]
|
|
|
]
|
|
|
]]);
|
|
|
$body['query']['bool']['must'][] = $this->assignSql('收件箱');
|
|
|
return $this->es->count($body);
|
|
|
}
|
|
|
|
|
|
}
|
...
|
...
|
|