diff --git a/src/EsService.php b/src/EsService.php index df0e4b8..3c9b325 100644 --- a/src/EsService.php +++ b/src/EsService.php @@ -55,6 +55,20 @@ public function paging($index, $type, $data) ]; } } + if (isset($data['must']['wildcard']) && $data['must']['wildcard']) { + foreach ($data['must']['wildcard'] as $key => $value) { + $must['bool']['must'][] = [ + 'wildcard' => $value + ]; + } + } + if (isset($data['must']['match']) && $data['must']['match']) { + foreach ($data['must']['match'] as $key => $value) { + $must['bool']['must'][] = [ + 'match' => $value + ]; + } + } } // 排除查询 if (isset($data['mustNot']) && $data['mustNot']) {