Features: None;

Fixes: None;

Extra: 1) Remove unused "synonym_filter" and "synonym_analyzer" definitions in Elasticsearch configuration; 2) Cleanup redundant code for better maintainability;
This commit is contained in:
Egor Pavlovich Gorbunov 2025-06-20 04:01:20 +03:00
parent 97829d23a6
commit 778d65b963

View file

@ -192,7 +192,6 @@ COMMON_ANALYSIS = {
"encoder": "double_metaphone", "encoder": "double_metaphone",
"replace": False, "replace": False,
}, },
"synonym_filter": {"type": "synonym", "synonyms_path": "analysis/synonyms.txt"},
"english_stop": {"type": "stop", "stopwords": "_english_"}, "english_stop": {"type": "stop", "stopwords": "_english_"},
}, },
"analyzer": { "analyzer": {
@ -208,10 +207,6 @@ COMMON_ANALYSIS = {
"tokenizer": "standard", "tokenizer": "standard",
"filter": ["lowercase", "asciifolding", "ngram_filter"], "filter": ["lowercase", "asciifolding", "ngram_filter"],
}, },
"synonym_analyzer": {
"tokenizer": "standard",
"filter": ["lowercase", "asciifolding", "synonym_filter"],
},
"name_phonetic": { "name_phonetic": {
"tokenizer": "standard", "tokenizer": "standard",
"filter": ["lowercase", "asciifolding", "double_metaphone"], "filter": ["lowercase", "asciifolding", "double_metaphone"],