Skip to content

Commit

Permalink
Merge pull request #33 from designmynight/fuzziness
Browse files Browse the repository at this point in the history
Fuzziness
  • Loading branch information
alasdairmackenzie authored Feb 21, 2018
2 parents 45e4790 + b4ec519 commit 8b186ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/DesignMyNight/Elasticsearch/QueryGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,11 @@ protected function compileWhereSearch(Builder $builder, array $where): array
];
}

if (!empty($where['options']['fuzziness'])) {
$firstKey = array_keys($query)[0];
$query[$firstKey]['fuzziness'] = (int) $where['options']['fuzziness'];
}

return $query;
}

Expand Down

0 comments on commit 8b186ce

Please sign in to comment.