weaviate/weaviate · error
cannot use whitespace in stopword.additions
Error message
cannot use whitespace in stopword.additions
What it means
Stopword config validation found an entry in stopword.additions that is empty or whitespace-only. Blank stopwords cannot match tokens and would pollute the preset, so they are rejected during Additions scanning.
Source
Thrown at adapters/repos/db/inverted/config.go:159
return errors.Errorf("stopwordPreset '%s' does not exist", conf.Preset)
}
err := validateStopwordAdditionsRemovals(conf)
if err != nil {
return err
}
return nil
}
func validateStopwordAdditionsRemovals(conf *models.StopwordConfig) error {
// the same stopword cannot exist
// in both additions and removals
foundAdditions := make(map[string]int)
for idx, add := range conf.Additions {
if strings.TrimSpace(add) == "" {
return errors.Errorf("cannot use whitespace in stopword.additions")
}
// save the index of the addition since it
// is readily available here. we will need
// this below when trimming additions that
// already exist in the selected preset
foundAdditions[add] = idx
}
for _, rem := range conf.Removals {
if strings.TrimSpace(rem) == "" {
return errors.Errorf("cannot use whitespace in stopword.removals")
}
if _, ok := foundAdditions[rem]; ok {
return errors.Errorf(
"found '%s' in both stopwords.additions and stopwords.removals", rem)
}View on GitHub (pinned to 75aa4b6d11)
Solutions
- Remove or trim empty entries from stopword.additions
- Note: additions already present in the chosen preset are trimmed automatically
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at adapters/repos/db/inverted/config.go:159 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/0d21db99e7ff8c54.
Report an issue: GitHub.