|
...
|
...
|
@@ -597,21 +597,23 @@ class MailListV2Es2 extends Base { |
|
|
|
"bool"=>[
|
|
|
|
"must"=>[
|
|
|
|
["term"=>["postid"=>$postid]],
|
|
|
|
["term"=>["source"=>2]],
|
|
|
|
["term"=>["folder_as_int"=>1]],
|
|
|
|
[
|
|
|
|
'query_string' => [
|
|
|
|
'query'=> implode(" ",array_map(function ($v){
|
|
|
|
return '"'.addcslashes($v,'"').'"';
|
|
|
|
},$subjects)),
|
|
|
|
"default_field"=> "subject"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
["term"=>["source"=>2]], // ai邮件
|
|
|
|
["term"=>["folder_as_int"=>1]], // 收件箱
|
|
|
|
["term"=>["deleted"=>0]], // 非删除
|
|
|
|
["term"=>["is_hots"=>0]], // 不是预热
|
|
|
|
["term"=>["is_auto"=>0]], // 非自动回复
|
|
|
|
]
|
|
|
|
]
|
|
|
|
];
|
|
|
|
$count = $this->es->count(['query'=>$query]);
|
|
|
|
|
|
|
|
$lists = $this->es->search(['query'=>$query,"_source" => ["subject"]],0,5000);
|
|
|
|
$count = 0;
|
|
|
|
foreach ($lists['hits']['hits']??[] as $item){
|
|
|
|
foreach ($subjects as $subject){
|
|
|
|
if(str_ends_with($item['_source']['subject'],$subject)){
|
|
|
|
$count++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return [
|
|
|
|
'count' => $count
|
|
|
|
];
|
...
|
...
|
|