|
@@ -1483,16 +1483,16 @@ class Expedite extends Base
|
|
|
if($module) $where['body']['query']['bool']['must'][] = ['match' =>['module'=> $module]];
|
|
|
if($module == 'demand' && $is_over != -1 ) $where['body']['query']['bool']['must'][] = ['match' =>['is_over'=> $is_over]];
|
|
|
if($module == 'recruit' && $city ) $where['body']['query']['bool']['must'][] = ['match' =>['city'=> $city]];
|
|
|
-// if($search) $where['body']['query']['bool']['must'][] = ['bool' =>[
|
|
|
-// 'should'=> [
|
|
|
-// 'multi_match' => [
|
|
|
-// 'fields'=> ['title','label','desc','content','detail'],
|
|
|
-// 'query'=> $search,
|
|
|
-// "fuzziness"=>"AUTO",
|
|
|
-// 'type'=> 'best_fields',
|
|
|
-// ]]]];
|
|
|
- if($search) $where['body']['query']['bool']['must'][] = [
|
|
|
- 'bool' =>[
|
|
|
+ if($search) $where['body']['query']['bool']['must'][] = ['bool' =>[
|
|
|
+ 'should'=> [
|
|
|
+ 'multi_match' => [
|
|
|
+ 'fields'=> ['title','label','desc','content','detail'],
|
|
|
+ 'query'=> $search,
|
|
|
+ "fuzziness"=>"AUTO",
|
|
|
+ 'type'=> 'best_fields',
|
|
|
+ ]]]];
|
|
|
+// if($search) $where['body']['query']['bool']['must'][] = [
|
|
|
+// 'bool' =>[
|
|
|
// 'should'=> [
|
|
|
// 'match_phrase'=>[
|
|
|
// 'title' => [
|
|
@@ -1500,15 +1500,15 @@ class Expedite extends Base
|
|
|
// 'slop' => 5
|
|
|
// ]
|
|
|
// ],
|
|
|
- 'multi_match' => [
|
|
|
- 'fields'=> ['title','label','desc','content','detail'],
|
|
|
- 'query'=> $search,
|
|
|
- "fuzziness"=>"AUTO",
|
|
|
- 'type'=> 'best_fields',
|
|
|
- ]
|
|
|
- ]
|
|
|
+// 'multi_match' => [
|
|
|
+// 'fields'=> ['title','label','desc','content','detail'],
|
|
|
+// 'query'=> $search,
|
|
|
+// "fuzziness"=>"AUTO",
|
|
|
+// 'type'=> 'best_fields',
|
|
|
+// ]
|
|
|
+// ]
|
|
|
// ]
|
|
|
- ];
|
|
|
+// ];
|
|
|
|
|
|
// return json($where);
|
|
|
$list = Elastic::select($index,$where);
|