作者 邓超

es

... ... @@ -276,7 +276,7 @@ class MailListV2Es extends Base {
'must' => [
['terms'=>['folder_id'=>$fids]],
['query_string'=>[
'query'=> implode(' ',$assign['from']),
'query'=> implode(' OR ',$assign['from']),
'default_field'=>'to'
]]
]
... ... @@ -287,7 +287,11 @@ class MailListV2Es extends Base {
'bool' => [
'must' => [
['terms'=>['folder_id'=>$fids]],
['terms'=>['from.email'=>$assign['from']]],
['query_string'=>[
'query'=>'from.email:('.implode(' OR ',array_map(function($e){
return '"'.$e.'"';
},$assign['from'])).')']
],
]
]
];
... ...