Skip to content

Commit

Permalink
Update TypesenseEngine.php
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson committed Oct 16, 2024
1 parent c460b0a commit 56329b0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Engines/TypesenseEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ public function get(): SearchResults
}

foreach ($this->facets as $field => $values) {
$values = collect($values)->map(
fn ($value) => '`'.$value.'`'
);
$values = collect($values)->map(function ($value) {
if ($value == 'false' || $value == 'true') {
return $value;
}
return '`'.$value.'`';
});


if ($values->count() > 1) {
$filters->push($field.':['.collect($values)->join(',').']');
Expand Down

0 comments on commit 56329b0

Please sign in to comment.