elastic/elasticsearch · error · IllegalArgumentException
enable_position_increments is not supported anymore. Please
Error message
enable_position_increments is not supported anymore. Please fix your analysis chain
What it means
Error "enable_position_increments is not supported anymore. Please fix your analysis chain" thrown in elastic/elasticsearch.
Source
Thrown at modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LengthTokenFilterFactory.java:32
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.analysis.AbstractTokenFilterFactory;
public class LengthTokenFilterFactory extends AbstractTokenFilterFactory {
private final int min;
private final int max;
// ancient unsupported option
private static final String ENABLE_POS_INC_KEY = "enable_position_increments";
LengthTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) {
super(name);
min = settings.getAsInt("min", 0);
max = settings.getAsInt("max", Integer.MAX_VALUE);
if (settings.get(ENABLE_POS_INC_KEY) != null) {
throw new IllegalArgumentException(ENABLE_POS_INC_KEY + " is not supported anymore. Please fix your analysis chain");
}
}
@Override
public TokenStream create(TokenStream tokenStream) {
return new LengthFilter(tokenStream, min, max);
}
}
View on GitHub (pinned to db6a809a66)
When it happens
Trigger: Thrown at modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LengthTokenFilterFactory.java:32 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of elastic/elasticsearch@db6a809a66 (2026-08-12).
Data as JSON: /api/errors/39474c8dea2614f1.
Report an issue: GitHub.