Skip to content

Commit

Permalink
Fix zero integer value in options (#802)
Browse files Browse the repository at this point in the history
Typesense accepts a `0` INT value in some search options parameters like "drop_tokens_threshold": 0. Due to the `array_filter()` function, it was filtered out in the final search query.
  • Loading branch information
alignwebs authored Jan 31, 2024
1 parent 6d61a92 commit 72a898a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Engines/TypesenseEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function search(Builder $builder)
{
return $this->performSearch(
$builder,
array_filter($this->buildSearchParameters($builder, 1, $builder->limit))
$this->buildSearchParameters($builder, 1, $builder->limit)
);
}

Expand All @@ -209,7 +209,7 @@ public function paginate(Builder $builder, $perPage, $page)
{
return $this->performSearch(
$builder,
array_filter($this->buildSearchParameters($builder, $page, $perPage))
$this->buildSearchParameters($builder, $page, $perPage)
);
}

Expand Down

0 comments on commit 72a898a

Please sign in to comment.