From 150a90c84e4191d8a9d7697ce3983e556fb3aab1 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 5 Mar 2023 08:29:58 +0100 Subject: [PATCH] [fix] fix threshold in replace_auto_language [1] https://github.com/searxng/searxng/pull/2027#pullrequestreview-1322157677 [2] https://github.com/searxng/searxng/pull/1969#issuecomment-1345354529 Signed-off-by: Markus Heiser --- searx/search/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/search/__init__.py b/searx/search/__init__.py index c5f225aa4..e5465880c 100644 --- a/searx/search/__init__.py +++ b/searx/search/__init__.py @@ -54,7 +54,7 @@ def replace_auto_language(search_query: SearchQuery): if search_query.lang != 'auto': return - detected_lang = detect_language(search_query.query, threshold=0.0, only_search_languages=True) + detected_lang = detect_language(search_query.query, threshold=0.3, only_search_languages=True) if detected_lang is None: # fallback to 'all' if no language has been detected search_query.lang = 'all'