正在显示
4 个修改的文件
包含
7 行增加
和
3 行删除
| @@ -72,8 +72,10 @@ function start(){ | @@ -72,8 +72,10 @@ function start(){ | ||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | }catch (Throwable $e){ | 74 | }catch (Throwable $e){ |
| 75 | + if(!strpos($e->getMessage(),'read time out')){ | ||
| 75 | logs('sync : '.$e->getMessage()); | 76 | logs('sync : '.$e->getMessage()); |
| 76 | } | 77 | } |
| 78 | + } | ||
| 77 | 79 | ||
| 78 | 80 | ||
| 79 | // 30秒后 消除占用 | 81 | // 30秒后 消除占用 |
| @@ -259,7 +259,8 @@ class HomeEs extends Base { | @@ -259,7 +259,8 @@ class HomeEs extends Base { | ||
| 259 | ]; | 259 | ]; |
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | - $lists = es()->search($query, ($page-1)*$limit, $limit,['udate'=>'desc']); | 262 | + $lists = es()->search(['query'=>['constant_score'=>['filter'=>$query['query']]]], ($page-1)*$limit, $limit,['udate'=>'desc']); |
| 263 | + | ||
| 263 | $total = $lists['hits']['total']['value']??0; | 264 | $total = $lists['hits']['total']['value']??0; |
| 264 | $lists = $lists['hits']['hits']??[]; | 265 | $lists = $lists['hits']['hits']??[]; |
| 265 | 266 |
| @@ -241,7 +241,8 @@ class MailListV2Es extends Base { | @@ -241,7 +241,8 @@ class MailListV2Es extends Base { | ||
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | 243 | ||
| 244 | - $result = $this->es->search(['query'=>$query],($page-1) * $limit,$limit,['udate'=>"desc"]); | 244 | + // $result = $this->es->search(['query'=>$query],($page-1) * $limit,$limit,['udate'=>"desc"]); |
| 245 | + $result = $this->es->search(['query'=>['constant_score'=>['filter'=>$query]]],($page-1) * $limit,$limit,['udate'=>"desc"]); | ||
| 245 | 246 | ||
| 246 | 247 | ||
| 247 | $total = $result['hits']['total']['value']??0; | 248 | $total = $result['hits']['total']['value']??0; |
| @@ -92,7 +92,7 @@ class Home extends Base { | @@ -92,7 +92,7 @@ class Home extends Base { | ||
| 92 | ]]]; | 92 | ]]]; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | - $lists = es()->search($query,0,$limit,[],false); | 95 | + $lists = es()->search(['query'=>['constant_score'=>['filter'=>$query['query']]]],0,$limit,[],false); |
| 96 | 96 | ||
| 97 | $lists = $lists['hits']['hits']??[]; | 97 | $lists = $lists['hits']['hits']??[]; |
| 98 | 98 |
-
请 注册 或 登录 后发表评论