From 3184a493621f202562f7754b70d28a4cfd8eb9b0 Mon Sep 17 00:00:00 2001 From: shine <347796337@qq.com> Date: Fri, 19 May 2023 11:47:42 +0800 Subject: [PATCH] enhance completion analyzer --- .../java/org/dromara/easyes/core/toolkit/IndexUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easy-es-core/src/main/java/org/dromara/easyes/core/toolkit/IndexUtils.java b/easy-es-core/src/main/java/org/dromara/easyes/core/toolkit/IndexUtils.java index 8598f96..b98e114 100644 --- a/easy-es-core/src/main/java/org/dromara/easyes/core/toolkit/IndexUtils.java +++ b/easy-es-core/src/main/java/org/dromara/easyes/core/toolkit/IndexUtils.java @@ -419,9 +419,10 @@ private static Map initInfo(EntityInfo entityInfo, GlobalConfig. info.put(BaseEsConstants.TYPE, indexParam.getFieldType()); } - // 是否text类型或keyword_text类型 + // 是否text类型或keyword_text类型或completion类型 boolean containsTextType = FieldType.TEXT.getType().equals(indexParam.getFieldType()) || - FieldType.KEYWORD_TEXT.getType().equals(indexParam.getFieldType()); + FieldType.KEYWORD_TEXT.getType().equals(indexParam.getFieldType()) || + FieldType.COMPLETION.getType().equals(indexParam.getFieldType()); if (containsTextType) { // 设置分词器 Optional.ofNullable(indexParam.getAnalyzer())