lqmac 1 month ago
parent 631db392b5
commit d6a08a5dcf
  1. 3
      app/common/library/elasticsearch/Client.php
  2. 2
      app/common/service/GoodsCateEs.php

@ -308,7 +308,8 @@ class Client
// 'match_phrase' => [$filed => $value] // 'match_phrase' => [$filed => $value]
// ]; // ];
$orlike[] = [ $orlike[] = [
'match' => [$filed => ['query' => $value, 'fuzziness' => "AUTO", 'operator' => 'or']] 'match' => [$filed => ['query' => $value, 'operator' => 'or']]
//'match' => [$filed => ['query' => $value, 'fuzziness' => "AUTO", 'operator' => 'or']]
]; ];
} }
} }

@ -86,7 +86,7 @@ class GoodsCateEs
$model = new Goods; $model = new Goods;
$goods_ids = array_column($data['data'], "goods_id"); $goods_ids = array_column($data['data'], "goods_id");
$goods_list = array_column($data['data'], null, "goods_id"); $goods_list = array_column($data['data'], null, "goods_id");
// var_dump($goods_ids); // var_dump($data['data']);
// exit(); // exit();
//$list = $model->getListByIds($goods_ids, 10); //$list = $model->getListByIds($goods_ids, 10);
$list = $model->getListByIdsFromApi($goods_ids); $list = $model->getListByIdsFromApi($goods_ids);

Loading…
Cancel
Save