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

版本: 6.8-7.15

简而言之,当 Elasticsearch 由于语法错误或无效参数而无法解析词向量请求时,就会发生此错误。这可能是由于格式错误的 JSON 请求或字段名称不正确造成的。要解决此问题,您应该首先验证请求的语法。确保 JSON 格式正确,所有字段名称都有效。如果错误仍然存在,请检查 Elasticsearch 日志以获取有关解析错误的更详细信息。如果您的 Elasticsearch 版本已过时,您可能还需要更新版本。

日志上下文 #

日志 “failed to parse term vectors request.” 的类名是 TermVectorsRequest.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解的人参考:

termVectorsRequest.type = parser.text();
 deprecationLogger.deprecate(DeprecationCategory.TYPES; "termvectors_with_types";
 RestTermVectorsAction.TYPES_DEPRECATION_MESSAGE);
 } else if (ID.match(currentFieldName; parser.getDeprecationHandler())) {
 if (termVectorsRequest.doc != null) {
 throw new ElasticsearchParseException("failed to parse term vectors request. " +
 "either [id] or [doc] can be specified; but not both!");
 }
 termVectorsRequest.id = parser.text();
 } else if (DOC.match(currentFieldName; parser.getDeprecationHandler())) {
 if (termVectorsRequest.id != null) {