...
|
...
|
@@ -16,6 +16,17 @@ use Model\folderSql; |
|
|
*/
|
|
|
class HomeEs extends Base {
|
|
|
|
|
|
/**
|
|
|
* @var \Lib\Es\Es
|
|
|
*/
|
|
|
public $es;
|
|
|
|
|
|
public function __construct()
|
|
|
{
|
|
|
$this->es = \es('email_lists_copy');
|
|
|
$postid = app()->request('postid','','intval');
|
|
|
if($postid) $this->es->setIndex('email_lists_branch_'.$postid);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 邮件列表
|
...
|
...
|
@@ -253,7 +264,7 @@ class HomeEs extends Base { |
|
|
];
|
|
|
}
|
|
|
|
|
|
$lists = es()->search(['query'=>['constant_score'=>['filter'=>$query['query']]]], ($page-1)*$limit, $limit,['udate'=>'desc']);
|
|
|
$lists = $this->es->search(['query'=>['constant_score'=>['filter'=>$query['query']]]], ($page-1)*$limit, $limit,['udate'=>'desc']);
|
|
|
|
|
|
$total = $lists['hits']['total']['value']??0;
|
|
|
$lists = $lists['hits']['hits']??[];
|
...
|
...
|
@@ -367,7 +378,7 @@ class HomeEs extends Base { |
|
|
}
|
|
|
|
|
|
|
|
|
return es()->count($body);
|
|
|
return $this->es->count($body);
|
|
|
|
|
|
};
|
|
|
|
...
|
...
|
|