Skip to content

Commit 0fb9cc3

Browse files
committed
fix fuzziness
falsy value '0' would not pass to Es
1 parent 3cd91ac commit 0fb9cc3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Query/Match.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ public function toArray(): array
8383
$array['match'][$this->field]['operator'] = $this->operator;
8484
}
8585

86-
if ($this->fuzziness && $this->fuzziness->__toString()) {
86+
if ($this->fuzziness !== NULL) {
8787
$array['match'][$this->field]['fuzziness'] = $this->fuzziness->__toString();
8888
}
8989

90-
if ($this->analyzer) {
90+
if ($this->analyzer !== NULL) {
9191
$array['match'][$this->field]['analyzer'] = $this->analyzer;
9292
}
9393

94-
if ($this->minimumShouldMatch) {
94+
if ($this->minimumShouldMatch !== NULL) {
9595
$array['match'][$this->field]['minimum_should_match'] = $this->minimumShouldMatch;
9696
}
9797

0 commit comments

Comments
 (0)