mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
add typesense search config values to .env
This commit is contained in:
parent
4ad079c600
commit
5f571cfb14
@ -103,6 +103,8 @@ QUEUE_DELAY_PER_JOB=5
|
||||
#TYPESENSE_HOST=localhost
|
||||
#TYPESENSE_PORT=8108
|
||||
#TYPESENSE_API_KEY=
|
||||
#TYPESENSE_SEARCH_EXHAUSTIVE=true
|
||||
#TYPESENSE_SEARCH_CUTTOFF_MS=450
|
||||
|
||||
###
|
||||
# ElasticSearch Config
|
||||
|
@ -31,7 +31,8 @@ class TypeSenseScoutSearchService implements ScoutSearchService
|
||||
// let's enable exhaustive search
|
||||
// which will make Typesense consider all variations of prefixes and typo corrections of the words
|
||||
// in the query exhaustively, without stopping early when enough results are found.
|
||||
$options['exhaustive_search'] = true;
|
||||
$options['exhaustive_search'] = env('TYPESENSE_SEARCH_EXHAUSTIVE', true);
|
||||
$options['search_cutoff_ms'] = env('TYPESENSE_SEARCH_EXHAUSTIVE', 450);
|
||||
|
||||
if (array_key_exists('per_page', $options) && $options['per_page'] > 250) {
|
||||
$options['per_page'] = min($this->maxItemsPerPage, 250);
|
||||
|
Loading…
x
Reference in New Issue
Block a user