mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Update configuration
This commit is contained in:
@@ -9,8 +9,15 @@ DB_DATABASE=${DB_DATABASE}
|
||||
|
||||
COMPOSER_AUTH='${COMPOSER_AUTH}'
|
||||
|
||||
# Search Driver: 'manticore' or 'elasticsearch'
|
||||
SEARCH_DRIVER=${SEARCH_DRIVER}
|
||||
|
||||
MANTICORESEARCH_HOST=${MANTICORESEARCH_HOST}
|
||||
MANTICORESEARCH_PORT=${MANTICORESEARCH_PORT}
|
||||
# ManticoreSearch Fuzzy Search Settings
|
||||
MANTICORESEARCH_FUZZY_ENABLED=${MANTICORESEARCH_FUZZY_ENABLED}
|
||||
MANTICORESEARCH_FUZZY_MAX_DISTANCE=${MANTICORESEARCH_FUZZY_MAX_DISTANCE}
|
||||
MANTICORESEARCH_FUZZY_LAYOUTS=${MANTICORESEARCH_FUZZY_LAYOUTS}
|
||||
|
||||
ELASTICSEARCH_HOST=${ELASTICSEARCH_HOST}
|
||||
ELASTICSEARCH_PORT=${ELASTICSEARCH_PORT}
|
||||
@@ -18,7 +25,11 @@ ELASTICSEARCH_SCHEME=${ELASTICSEARCH_SCHEME}
|
||||
ELASTICSEARCH_USER=${ELASTICSEARCH_USER}
|
||||
ELASTICSEARCH_PASS=${ELASTICSEARCH_PASS}
|
||||
ELASTICSEARCH_LOGGING=${ELASTICSEARCH_LOGGING}
|
||||
ELASTICSEARCH_ENABLED=${ELASTICSEARCH_ENABLED}
|
||||
# Elasticsearch Fuzzy Search Settings
|
||||
ELASTICSEARCH_FUZZY_ENABLED=${ELASTICSEARCH_FUZZY_ENABLED}
|
||||
ELASTICSEARCH_FUZZY_FUZZINESS=${ELASTICSEARCH_FUZZY_FUZZINESS}
|
||||
ELASTICSEARCH_FUZZY_PREFIX_LENGTH=${ELASTICSEARCH_FUZZY_PREFIX_LENGTH}
|
||||
ELASTICSEARCH_FUZZY_MAX_EXPANSIONS=${ELASTICSEARCH_FUZZY_MAX_EXPANSIONS}
|
||||
|
||||
NNTP_COMPRESSED_HEADERS=${NNTP_COMPRESSED_HEADERS}
|
||||
USE_ALTERNATE_NNTP_SERVER=${USE_ALTERNATE_NNTP_SERVER}
|
||||
|
||||
@@ -33,7 +33,6 @@ ELASTICSEARCH_SCHEME=http
|
||||
ELASTICSEARCH_USER=
|
||||
ELASTICSEARCH_PASS=
|
||||
ELASTICSEARCH_LOGGING=false
|
||||
ELASTICSEARCH_ENABLED=false
|
||||
#fuzzy search settings
|
||||
ELASTICSEARCH_FUZZY_ENABLED=false
|
||||
# Elasticsearch autocomplete settings
|
||||
|
||||
@@ -90,7 +90,7 @@ class NntmuxResetDb extends Command
|
||||
}
|
||||
unset($value);
|
||||
|
||||
if (config('nntmux.elasticsearch_enabled') === true) {
|
||||
if (config('search.default') === 'elasticsearch') {
|
||||
if (\Elasticsearch::indices()->exists(['index' => 'releases'])) {
|
||||
\Elasticsearch::indices()->delete(['index' => 'releases']);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,8 @@ final readonly class ProcessingConfiguration
|
||||
public string $audioSavePath;
|
||||
public string $tmpUnrarPath;
|
||||
public bool $debugMode;
|
||||
public bool $elasticsearchEnabled;
|
||||
public bool $searchEnabled;
|
||||
public string $searchDriver;
|
||||
public bool $renameMusicMediaInfo;
|
||||
public bool $renamePar2;
|
||||
public string|false $ffmpegPath;
|
||||
@@ -89,7 +90,8 @@ final readonly class ProcessingConfiguration
|
||||
$this->audioSavePath = config('nntmux_settings.covers_path').'/audiosample/';
|
||||
$this->tmpUnrarPath = config('nntmux.tmp_unrar_path');
|
||||
$this->debugMode = (bool) config('app.debug');
|
||||
$this->elasticsearchEnabled = config('nntmux.elasticsearch_enabled') === true;
|
||||
$this->searchDriver = config('search.default', 'manticore');
|
||||
$this->searchEnabled = in_array($this->searchDriver, ['manticore', 'elasticsearch']);
|
||||
$this->renameMusicMediaInfo = (bool) config('nntmux.rename_music_mediainfo');
|
||||
$this->renamePar2 = (bool) config('nntmux.rename_par2');
|
||||
// Regex patterns
|
||||
|
||||
@@ -810,11 +810,9 @@ class ReleaseSearchService
|
||||
return [];
|
||||
}
|
||||
|
||||
$esEnabled = config('nntmux.elasticsearch_enabled');
|
||||
if (config('app.debug')) {
|
||||
Log::debug('performIndexSearch: starting search', [
|
||||
'elasticsearch_enabled' => $esEnabled,
|
||||
'elasticsearch_enabled_type' => gettype($esEnabled),
|
||||
'search_driver' => config('search.default'),
|
||||
'searchFields' => $searchFields,
|
||||
'limit' => $limit,
|
||||
]);
|
||||
|
||||
@@ -19,7 +19,6 @@ return [
|
||||
'stream_fork_output' => env('STREAM_FORK_OUTPUT', false),
|
||||
'purge_inactive_users' => env('PURGE_INACTIVE_USERS', false),
|
||||
'purge_inactive_users_days' => env('PURGE_INACTIVE_USERS_DAYS', 180),
|
||||
'elasticsearch_enabled' => env('ELASTICSEARCH_ENABLED', false),
|
||||
'mysql_search_fallback' => env('MYSQL_SEARCH_FALLBACK', false), // Disable MySQL LIKE fallback when Manticore/Elasticsearch return no results
|
||||
'btcpay_webhook_secret' => env('BTCPAY_SECRET'),
|
||||
'tmp_unrar_path' => env('TEMP_UNRAR_PATH', storage_path('tmp/unrar/')),
|
||||
|
||||
Reference in New Issue
Block a user