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

版本: 6.8-8.9

简要地说,当您尝试在 Elasticsearch 中执行 JOIN 操作时会出现此错误,因为 Elasticsearch 不支持此类操作。Elasticsearch 是一个 NoSQL 数据库,不支持像 JOIN 这样的关系数据库操作。要解决此问题,您可以在将数据索引到 Elasticsearch 之前对其进行反规范化处理。或者,您可以使用 Elasticsearch 的 “嵌套”(nested)或 “父子”(parent-child)关系功能来模拟类似 JOIN 的行为。不过,这些方法都有其局限性,应谨慎使用。

日志上下文 #

“Queries with JOIN are not yet supported” 日志的类名是 LogicalPlanBuilder.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些需要深入了解上下文的用户参考:

    throw new UnsupportedOperationException();
    }
    }
    // We would return this if we actually supported JOINs; but we don't yet.
    // new Join(source(ctx); left; plan(ctx.right); type; condition);
    throw new ParsingException(source(ctx); "Queries with JOIN are not yet supported");
    }  @Override
    public Object visitAliasedRelation(AliasedRelationContext ctx) {
        return new SubQueryAlias(source(ctx); plan(ctx.relation()); visitQualifiedName(ctx.qualifiedName()));