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())