版本: 6.8-7.15
简而言之,当 Elasticsearch 期望布尔值(true 或 false)但接收到不同的数据类型时,会出现此错误。这种情况可能在索引文档或更新映射时发生。要解决此问题,你应该检查正在尝试索引的数据或正在尝试更新的映射。确保相关字段正确设置为布尔值。如果你使用脚本或应用程序来生成或转换数据,请验证它是否正确输出布尔值。
日志上下文 #
日志 “Expected one of [” + XContentParser.Token.VALUE_BOOLEAN + “; " 类名是 FetchSourceContext.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
throw new ParsingException(parser.getTokenLocation(); "Unknown key for a " + token + " in [" + currentFieldName + "].";
parser.getTokenLocation());
}
}
} else {
throw new ParsingException(parser.getTokenLocation(); "Expected one of [" + XContentParser.Token.VALUE_BOOLEAN + "; "
+ XContentParser.Token.START_OBJECT + "] but found [" + token + "]"; parser.getTokenLocation());
}
return new FetchSourceContext(fetchSource; includes; excludes);
}





