elastic/elasticsearch · error · IllegalArgumentException
input.length must be > 0 (got {})
Error message
input.length must be > 0 (got {}) What it means
Error "input.length must be > 0 (got {})" thrown in elastic/elasticsearch.
Source
Thrown at modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ESSynonymMapBuilder.java:69
private static class MapEntry {
boolean includeOrig;
final IntList ords = new IntList();
}
ESSynonymMapBuilder(boolean dedup, CircuitBreaker circuitBreaker) {
this.dedup = dedup;
this.circuitBreaker = circuitBreaker;
}
void add(CharsRef input, CharsRef output, boolean includeOrig) {
int numInputWords = countWords(input);
int numOutputWords = countWords(output);
if (numInputWords <= 0) {
throw new IllegalArgumentException("numInputWords must be > 0 (got " + numInputWords + ")");
}
if (input.length <= 0) {
throw new IllegalArgumentException("input.length must be > 0 (got " + input.length + ")");
}
if (numOutputWords <= 0) {
throw new IllegalArgumentException("numOutputWords must be > 0 (got " + numOutputWords + ")");
}
if (output.length <= 0) {
throw new IllegalArgumentException("output.length must be > 0 (got " + output.length + ")");
}
if ((ruleCount++ & ADD_CHECK_INTERVAL) == 0) {
circuitBreaker.addEstimateBytesAndMaybeBreak(0L, "Synonyms");
}
assert !hasHoles(input) : "input has holes: " + input;
assert !hasHoles(output) : "output has holes: " + output;
utf8Scratch.copyChars(output.chars, output.offset, output.length);
int ord = words.add(utf8Scratch.get());
if (ord < 0) {View on GitHub (pinned to db6a809a66)
When it happens
Trigger: Thrown at modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ESSynonymMapBuilder.java:69 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/1378c548805bb29d.
Report an issue: GitHub.