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

版本: 7.16-8.9

简而言之,当您尝试执行 Elasticsearch 字段类型不支持的查询操作时,会出现此错误。例如,您可能尝试对文本字段执行范围查询。要解决此问题,您可以更改字段类型以支持查询操作,或者修改查询以适应该字段类型。另一种解决方案是添加一个具有适当类型的新字段并重新索引数据。

日志上下文

日志 “query relation not supported for Field [” + fieldName + “].” 的类名是 ShapeQueryProcessor.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:

    boolean hasDocValues
    ) {
        validateIsShapeFieldType(fieldName; context);
        // CONTAINS queries are not supported by VECTOR strategy for indices created before version 7.5.0 (Lucene 8.3.0);
        if (relation == ShapeRelation.CONTAINS && context.indexVersionCreated().before(IndexVersion.V_7_5_0)) {
            throw new QueryShardException(context; ShapeRelation.CONTAINS + " query relation not supported for Field [" + fieldName + "].");
        }
        if (shape == null) {
            return new MatchNoDocsQuery();
        }
        return getVectorQueryFromShape(shape; fieldName; relation; context; hasDocValues);
查看 Markdown
On this page