mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-07-01 09:44:19 +00:00
feat(search): PAPERLESS_SEARCH_LANGUAGE and PAPERLESS_ADVANCED_FUZZY_SEARCH_THRESHOLD settings
Add two new environment variables for Tantivy search backend: - PAPERLESS_SEARCH_LANGUAGE: language code for stemming (empty string disables) - PAPERLESS_ADVANCED_FUZZY_SEARCH_THRESHOLD: float threshold for fuzzy search blending (None disables) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -85,6 +85,13 @@ EMPTY_TRASH_DIR = (
|
||||
# threads.
|
||||
MEDIA_LOCK = MEDIA_ROOT / "media.lock"
|
||||
INDEX_DIR = DATA_DIR / "index"
|
||||
|
||||
SEARCH_LANGUAGE: str = os.getenv("PAPERLESS_SEARCH_LANGUAGE", "")
|
||||
|
||||
ADVANCED_FUZZY_SEARCH_THRESHOLD: float | None = get_float_from_env(
|
||||
"PAPERLESS_ADVANCED_FUZZY_SEARCH_THRESHOLD",
|
||||
)
|
||||
|
||||
MODEL_FILE = get_path_from_env(
|
||||
"PAPERLESS_MODEL_FILE",
|
||||
DATA_DIR / "classification_model.pickle",
|
||||
|
||||
Reference in New Issue
Block a user