From 35252ffbae532528629b7461844f53c335db30b6 Mon Sep 17 00:00:00 2001 From: aoiasd <45024769+aoiasd@users.noreply.github.com> Date: Wed, 11 Jun 2025 14:40:37 +0800 Subject: [PATCH] enhance: [2.5] use english name as language name for all type language identifier (#42601) Set whatlang detect return language name as english name. Make sure same with lingua. pr: https://github.com/milvus-io/milvus/pull/42600 Signed-off-by: aoiasd --- .../src/analyzer/tokenizers/lang_ident_tokenizer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/core/thirdparty/tantivy/tantivy-binding/src/analyzer/tokenizers/lang_ident_tokenizer.rs b/internal/core/thirdparty/tantivy/tantivy-binding/src/analyzer/tokenizers/lang_ident_tokenizer.rs index 8a6d241087..af1c8e9478 100644 --- a/internal/core/thirdparty/tantivy/tantivy-binding/src/analyzer/tokenizers/lang_ident_tokenizer.rs +++ b/internal/core/thirdparty/tantivy/tantivy-binding/src/analyzer/tokenizers/lang_ident_tokenizer.rs @@ -36,7 +36,7 @@ impl Identifier for WhatlangIdentifier { detect(text) .map_or("default", |info| { if info.confidence() > self.confidence { - info.lang().code() + info.lang().eng_name() } else { "default" }