版本: 7.8-8.9
简而言之,当Elasticsearch查询中的命令顺序不正确时,就会发生此错误。具体来说,[by]命令应该在[with]命令之前指定,而不是之后。要解决此问题,您应该重新排列查询,使[by]命令位于[with]命令之前。此外,确保您的查询语法正确并遵循Elasticsearch指南。如果错误仍然存在,请考虑检查查询中是否存在其他潜在的语法或逻辑错误。
日志上下文 #
日志"Please specify sequence [by] before [with] not after"的类名是 LogicalPlanBuilder.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:
@Override
public Sequence visitSequence(SequenceContext ctx) {
Source source = source(ctx); if (ctx.disallowed != null && ctx.sequenceParams() != null) {
throw new ParsingException(source; "Please specify sequence [by] before [with] not after");
} ListparentJoinKeys = visitJoinKeys(ctx.by);
TimeValue maxSpan = visitSequenceParams(ctx.sequenceParams());





