版本: 7.11-8.9
简而言之,当 Elasticsearch 中的 “position_increment_gap” 参数被设置为负值时,会发生此错误。该参数用于控制数组中值之间的距离,并且必须是正数。要解决此问题,你应该检查 Elasticsearch 设置,并确保 “position_increment_gap” 参数被设置为正值。如果你使用脚本或应用程序来设置此参数,请确保它不会生成负值。
日志上下文 #
日志 “[position_increment_gap] must be positive; got [” + v + “]” 的类名是 TextParams.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入背景的人参考:
false;
positionGapInitFunction;
TextFieldMapper.Defaults.POSITION_INCREMENT_GAP
).addValidator(v -> {
if (v < 0) {
throw new MapperParsingException("[position_increment_gap] must be positive; got [" + v + "]");
}
});
this.indexAnalyzers = indexAnalyzers;
}





