作者 邓超

x

@@ -132,7 +132,7 @@ class SyncToEsCmd { @@ -132,7 +132,7 @@ class SyncToEsCmd {
132 132
133 sleep(5); 133 sleep(5);
134 134
135 - $this->es = es('email_lists_copy'); // 第二个库 新 135 + $this->es = es('email_lists_all'); // 第二个库 新
136 136
137 $this->bulkData = new \Lib\Es\BulkData(); 137 $this->bulkData = new \Lib\Es\BulkData();
138 138
@@ -183,7 +183,7 @@ class SyncToEsCmd { @@ -183,7 +183,7 @@ class SyncToEsCmd {
183 // 只有非ai邮箱才进 183 // 只有非ai邮箱才进
184 if($data['source'] != 2){ 184 if($data['source'] != 2){
185 // 主库 185 // 主库
186 - $this->bulkData->add('email_lists_copy',$doc_id,$data); 186 + $this->bulkData->add('email_lists_all',$doc_id,$data);
187 } 187 }
188 if($data['postid']){ 188 if($data['postid']){
189 // 分库 189 // 分库
@@ -342,9 +342,9 @@ class SyncToEsCmd { @@ -342,9 +342,9 @@ class SyncToEsCmd {
342 'description' => ['type' => 'keyword'], 342 'description' => ['type' => 'keyword'],
343 'references' => ['type' => 'keyword'] 343 'references' => ['type' => 'keyword']
344 ] 344 ]
345 - ],$index == 'email_lists_copy' ? [  
346 - 'number_of_shards' => 21, // 设置分片数  
347 - 'number_of_replicas' => 1, // 设置副本数 暂用内存 主片+副片* 345 + ],$index == 'email_lists_all' ? [
  346 + 'number_of_shards' => 3, // 设置分片数
  347 + 'number_of_replicas' => 0, // 设置副本数 暂用内存 主片+副片*
348 ]:[ 348 ]:[
349 'number_of_shards' => 1, // 设置分片数 349 'number_of_shards' => 1, // 设置分片数
350 'number_of_replicas' => 0, // 设置副本数 暂用内存 主片+副片* 350 'number_of_replicas' => 0, // 设置副本数 暂用内存 主片+副片*
@@ -391,7 +391,7 @@ class SyncToEsCmd { @@ -391,7 +391,7 @@ class SyncToEsCmd {
391 foreach ($this->bulkData->getIndexs() as $index){ 391 foreach ($this->bulkData->getIndexs() as $index){
392 $this->es->setIndex($index); 392 $this->es->setIndex($index);
393 // 检查数据库是否存在 393 // 检查数据库是否存在
394 - if(empty($this->checkEsIndex[$index]) && $index != 'email_lists_copy'){ 394 + if(empty($this->checkEsIndex[$index]) && $index != 'email_lists_all'){
395 if(!redis()->has('esmapcheck:'.$index)){ 395 if(!redis()->has('esmapcheck:'.$index)){
396 $m = $this->setEsMap($index); 396 $m = $this->setEsMap($index);
397 if($m !== 9) _echo("{$index} 创建索引 ".$m); 397 if($m !== 9) _echo("{$index} 创建索引 ".$m);
@@ -23,7 +23,7 @@ class HomeEs extends Base { @@ -23,7 +23,7 @@ class HomeEs extends Base {
23 23
24 public function __construct() 24 public function __construct()
25 { 25 {
26 - $this->es = \es('email_lists_copy'); 26 + $this->es = \es('email_lists_all');
27 $postid = app()->request('postid','','intval'); 27 $postid = app()->request('postid','','intval');
28 if($postid) $this->es->setIndex('email_lists_branch_'.$postid); 28 if($postid) $this->es->setIndex('email_lists_branch_'.$postid);
29 } 29 }
@@ -28,7 +28,7 @@ class MailListV2Es2 extends Base { @@ -28,7 +28,7 @@ class MailListV2Es2 extends Base {
28 28
29 public function __construct() 29 public function __construct()
30 { 30 {
31 - $this->es = \es('email_lists_copy'); 31 + $this->es = \es('email_lists_all');
32 $postid = app()->request('postid','','intval'); 32 $postid = app()->request('postid','','intval');
33 $this->es->setIndex('email_lists_branch_'.$postid); 33 $this->es->setIndex('email_lists_branch_'.$postid);
34 } 34 }
@@ -791,7 +791,7 @@ function minMaxToArray($min, $max,$len=1000) { @@ -791,7 +791,7 @@ function minMaxToArray($min, $max,$len=1000) {
791 * @author:dc 791 * @author:dc
792 * @time 2025/5/22 9:42 792 * @time 2025/5/22 9:42
793 */ 793 */
794 -function es(string $index='email_lists_copy'){ 794 +function es(string $index='email_lists_all'){
795 return (new Lib\Es\Es($index,['https://ai-email:3mLbEKwDX9YjUDFm@172.19.0.56:9200'])); 795 return (new Lib\Es\Es($index,['https://ai-email:3mLbEKwDX9YjUDFm@172.19.0.56:9200']));
796 } 796 }
797 797