作者 邓超

es

... ... @@ -272,26 +272,22 @@ class MailListV2Es extends Base {
if($fids && !empty($assign['from'])){
if($folder=='发件箱'){
$query = [
'query' =>[
'bool' => [
'must' => [
['terms'=>['folder_id'=>$fids]],
['query_string'=>[
'query'=> implode(' ',$assign['from']),
'default_field'=>'to'
]]
]
'bool' => [
'must' => [
['terms'=>['folder_id'=>$fids]],
['query_string'=>[
'query'=> implode(' ',$assign['from']),
'default_field'=>'to'
]]
]
]
];
}else{
$query = [
'query' =>[
'bool' => [
'must' => [
['terms'=>['folder_id'=>$fids]],
['terms'=>['from.email'=>$assign['from']]],
]
'bool' => [
'must' => [
['terms'=>['folder_id'=>$fids]],
['terms'=>['from.email'=>$assign['from']]],
]
]
];
... ... @@ -304,14 +300,12 @@ class MailListV2Es extends Base {
if($query && $afids){
return [
'query' =>[
'bool' => [
'must' => [
$query
],
'should' =>[
['terms'=>['folder_id'=>$afids]]
]
'bool' => [
'must' => [
$query
],
'should' =>[
['terms'=>['folder_id'=>$afids]]
]
]
];
... ...