版本: 6.8-8.9
简而言之,当在 Elasticsearch 的 [parent_id] 查询中使用了不支持的字段时,会发生此错误。[parent_id] 查询仅支持 ‘type’ 和 ‘id’ 字段。如果使用任何其他字段,将会抛出此错误。要解决此问题,请确保在 [parent_id] 查询中仅使用 ‘type’ 和 ‘id’ 字段。此外,请检查查询中是否存在拼写错误或错误的字段名。如果问题仍然存在,请考虑重新构建数据或查询以避免使用 [parent_id] 查询。
日志上下文 #
日志 “[parent_id] query does not support [” + currentFieldName + “]” 的类名是 ParentIdQueryBuilder.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
} else if (AbstractQueryBuilder.BOOST_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
boost = parser.floatValue();
} else if (AbstractQueryBuilder.NAME_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
queryName = parser.text();
} else {
throw new ParsingException(parser.getTokenLocation(), "[parent_id] query does not support [" + currentFieldName + "]");
}
} else {
throw new ParsingException(parser.getTokenLocation(), "[parent_id] query does not support [" + currentFieldName + "]");
}
}





