|
|
@ -10,6 +10,8 @@ class GoodsEs |
|
|
|
|
|
|
|
|
|
|
|
private string $index_name = 'goods_list'; |
|
|
|
private string $index_name = 'goods_list'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private string $field = 'goods_id,goods_type,goods_no,goods_name'; |
|
|
|
|
|
|
|
|
|
|
|
public function __construct() |
|
|
|
public function __construct() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->esService = Client::setEs($this->index_name); |
|
|
|
$this->esService = Client::setEs($this->index_name); |
|
|
@ -23,6 +25,7 @@ class GoodsEs |
|
|
|
public function list($params = [],$page = 1, $limit = 10) |
|
|
|
public function list($params = [],$page = 1, $limit = 10) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return $this->esService |
|
|
|
return $this->esService |
|
|
|
|
|
|
|
->select($this->field) |
|
|
|
// ->setDebug() |
|
|
|
// ->setDebug() |
|
|
|
->like($params) |
|
|
|
->like($params) |
|
|
|
->from($page) |
|
|
|
->from($page) |
|
|
|