📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-8.9

简而言之,当Elasticsearch中的多字段未分配类型时会发生此错误。多字段用于以不同方式索引同一字段,每种方式都需要特定的类型。要解决此问题,您需要在映射中为多字段指定类型。可以是text、keyword、date、long、double或任何其他有效的Elasticsearch类型。同时,确保该类型适合您正在索引的数据。

日志上下文 #

日志 “no type specified for property [” + multiFieldName + “]” 的类名是 TypeParsers.java。 我们从Elasticsearch源代码中提取了以下内容,供寻求深入理解的人参考:

String type;
 Object typeNode = multiFieldNodes.get("type");
 if (typeNode != null) {
 type = typeNode.toString();
 } else {
 throw new MapperParsingException("no type specified for property [" + multiFieldName + "]");
 }  Mapper.TypeParser typeParser = parserContext.typeParser(type);
 if (typeParser == null) {
 throw new MapperParsingException("no handler for type [" + type + "] declared on field [" + multiFieldName + "]");