Skip to content

Commit

Permalink
模糊匹配
Browse files Browse the repository at this point in the history
  • Loading branch information
wang.yu committed Jul 13, 2022
1 parent a358fbe commit 4727238
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/EsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']) {
Expand Down

0 comments on commit 4727238

Please sign in to comment.