weaviate/weaviate · error
aggregate sparse search: %w
Error message
aggregate sparse search: %w
What it means
Wrapper in the aggregator's hybrid() closure: when the sparse (BM25) leg of hybrid search, executed via bm25Objects over the inverted index, fails, the error is re-wrapped as 'aggregate sparse search: %w'.
Source
Thrown at adapters/repos/db/aggregator/grouper.go:137
} else {
ids = allowList.Slice()
}
return ids, err
}
func (g *grouper) hybrid(ctx context.Context, allowList helpers.AllowList, modules *modules.Provider) ([]uint64, error) {
g.setDefaultObjectLimit()
sparseSearch := func() ([]*storobj.Object, []float32, error) {
kw, err := g.buildHybridKeywordRanking()
if err != nil {
return nil, nil, fmt.Errorf("build hybrid keyword ranking: %w", err)
}
sparse, dists, err := g.bm25Objects(ctx, kw, allowList)
if err != nil {
return nil, nil, fmt.Errorf("aggregate sparse search: %w", err)
}
return sparse, dists, nil
}
denseSearch := func(vec models.Vector) ([]*storobj.Object, []float32, error) {
res, dists, err := g.objectVectorSearch(ctx, vec, allowList)
if err != nil {
return nil, nil, fmt.Errorf("aggregate grouped dense search: %w", err)
}
return res, dists, nil
}
res, err := hybrid.Search(ctx, &hybrid.Params{
HybridSearch: g.params.Hybrid,
Keyword: nil,
Class: g.params.ClassName.String(),View on GitHub (pinned to 75aa4b6d11)
Solutions
- Read the wrapped cause for the underlying BM25 failure.
- Verify shard health and run recovery/repair on the affected collection if index errors are logged.
- Check stopword configuration and tokenization settings in InvertedIndexConfig.
- Retry the aggregation; if persistent, reindex or restore the affected shard from backup.
Defensive patterns
Strategy: retry
Validate before calling
// ensure collection has text/searchable properties and healthy shards before hybrid aggregation
if len(class.Properties) == 0 { skip sparse leg } Try / catch
err := runHybridAggregate(); if errors.Is/contains inverted-index or shard errors { retry with backoff; then trigger shard repair } Prevention
- Keep LSM compaction and shard health monitored
- Validate stopword/tokenizer configuration in InvertedIndexConfig
- Avoid modifying searchable properties during heavy aggregation load
When it happens
Trigger: Hybrid aggregation where BM25F search over the collection's inverted index returns an error — inverted index corruption, missing shard, tokenizer/stopword configuration problems, or class lookup failure inside bm25Objects.
Common situations: Damaged or compacting LSM inverted indexes, searching a class whose searchable properties configuration changed, or shard unavailability on a node.
Related errors
- build hybrid keyword ranking: %w
- aggregate sparse search: %w
- bm25 objects: %w
- No properties provided, and no indexed properties found in c
- failed to extract hybrid params: %w
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/39986296891cf33a.
Report an issue: GitHub.