Skip to content

Commit

Permalink
Just pass search_options over
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell committed Aug 20, 2024
1 parent 668e0e0 commit 4b69bcb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Typesense/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ public function searchUsingApi($query, array $options = []): Collection
->join(',') ?: '*';
}

foreach (Arr::get($this->config, 'settings.search_options', []) as $handle => $value) {
if (! isset($options[$handle])) {
$options[$handle] = $value;
}
}

$searchResults = $this->getOrCreateIndex()->documents->search($options);

return collect($searchResults['hits'] ?? [])
Expand Down

0 comments on commit 4b69bcb

Please sign in to comment.