weaviate/weaviate · error
inconsistent results: input=%d neighbors=%d
Error message
inconsistent results: input=%d neighbors=%d
What it means
After fetching nearest words for every input vector, Multi verifies the search engine returned exactly one neighbor set per input; a mismatch means the contextionary search silently dropped or duplicated results. The error protects downstream per-item assignment from desyncing (wrong neighbors attached to wrong objects).
Source
Thrown at modules/text2vec-contextionary/additional/nearestneighbors/extender.go:87
if in == nil {
return nil, nil
}
vectors := make([][]float32, len(in))
for i, res := range in {
if len(res.Vector) == 0 {
return nil, fmt.Errorf("item %d has no vector", i)
}
vectors[i] = res.Vector
}
neighbors, err := e.searcher.MultiNearestWordsByVector(ctx, vectors, DefaultK, limitOrDefault(limit))
if err != nil {
return nil, errors.Wrap(err, "get neighbors for search results")
}
if len(neighbors) != len(in) {
return nil, fmt.Errorf("inconsistent results: input=%d neighbors=%d", len(in), len(neighbors))
}
for i, res := range in {
up := res.AdditionalProperties
if up == nil {
up = models.AdditionalProperties{}
}
up["nearestNeighbors"] = removeDollarElements(neighbors[i])
in[i].AdditionalProperties = up
}
return in, nil
}
func NewExtender(searcher contextionary) *Extender {
return &Extender{searcher: searcher}
}View on GitHub (pinned to 75aa4b6d11)
Solutions
- Retry the query — transient index state may resolve it
- Check contextionary index health/rebuild it if inconsistent results persist
- Report/inspect the searcher implementation to ensure it returns one result group per input vector
Defensive patterns
Strategy: retry
Try / catch
out, err := extender.Multi(ctx, in, limit)
if err != nil && strings.Contains(err.Error(), "inconsistent results") {
out, err = extender.Multi(ctx, in, limit) // retry once
} Prevention
- Keep the contextionary index healthy and rebuild after crashes
- Avoid heavy concurrent writes during nearestNeighbors queries
- Test custom searcher implementations for 1:1 result counts
When it happens
Trigger: MultiNearestWordsByVector returns a different number of neighbor groups than the len(in) input results — e.g. internal contextionary index inconsistency, partial failures swallowed upstream, or a searcher implementation not preserving order/count.
Common situations: Degraded or reindexed contextionary state, custom searcher implementations, concurrent mutations during large multi-searches.
Related errors
- item %d has no vector
- replicate deletion: shard=%q %w
- after DocPointerWithScoreList: %w
- after createBlockTerm: %w
- sortedDocPointerWithScoreMerger do: %w
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/9e39ddcc2898a855.
Report an issue: GitHub.