作者 邓超

优化同步

... ... @@ -141,7 +141,7 @@ class HomeEs extends Base {
if(is_array($address)){
// 发贱人
if(Verify::sEmail($address['from']??'')){
$query['query']['bool']['must'][] = ['match'=>['from'=>$address['from']]];
$query['query']['bool']['must'][] = ['match'=>['from.email'=>$address['from']]];
}
// 收件人
if(Verify::sEmail($address['to']??'')){
... ... @@ -156,7 +156,7 @@ class HomeEs extends Base {
$query['query']['bool']['must'][] = [
'bool' =>[
'must'=>[
['match'=>['from'=>$address]]
['match'=>['from.email'=>$address]]
],
'should'=>[
['match'=>['to'=>$address]]
... ... @@ -191,7 +191,7 @@ class HomeEs extends Base {
// 不让查询数据
$query['query']['bool']['must'][] = ['term'=>['uuid'=>0]];
}else{
$query['query']['bool']['must'][] = ['match'=>['from'=>$from]];
$query['query']['bool']['must'][] = ['match'=>['from.email'=>$from]];
}
}
... ...