Skip to content

Commit

Permalink
match不分词
Browse files Browse the repository at this point in the history
  • Loading branch information
wang.yu committed Jul 25, 2022
1 parent 4727238 commit 6bc07e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/EsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ public function paging($index, $type, $data)
];
}
}
if (isset($data['must']['match_phrase']) && $data['must']['match_phrase']) {
foreach ($data['must']['match_phrase'] as $key => $value) {
$must['bool']['must'][] = [
'match_phrase' => $value
];
}
}
}
// 排除查询
if (isset($data['mustNot']) && $data['mustNot']) {
Expand Down

0 comments on commit 6bc07e0

Please sign in to comment.