{"record":{"id":"39986296891cf33a","repo":"weaviate/weaviate","slug":"aggregate-sparse-search-w-399862","errorCode":null,"errorMessage":"aggregate sparse search: %w","messagePattern":"aggregate sparse search: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"adapters/repos/db/aggregator/grouper.go","lineNumber":137,"sourceCode":"\t} else {\n\t\tids = allowList.Slice()\n\t}\n\n\treturn ids, err\n}\n\nfunc (g *grouper) hybrid(ctx context.Context, allowList helpers.AllowList, modules *modules.Provider) ([]uint64, error) {\n\tg.setDefaultObjectLimit()\n\n\tsparseSearch := func() ([]*storobj.Object, []float32, error) {\n\t\tkw, err := g.buildHybridKeywordRanking()\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"build hybrid keyword ranking: %w\", err)\n\t\t}\n\n\t\tsparse, dists, err := g.bm25Objects(ctx, kw, allowList)\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"aggregate sparse search: %w\", err)\n\t\t}\n\n\t\treturn sparse, dists, nil\n\t}\n\n\tdenseSearch := func(vec models.Vector) ([]*storobj.Object, []float32, error) {\n\t\tres, dists, err := g.objectVectorSearch(ctx, vec, allowList)\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"aggregate grouped dense search: %w\", err)\n\t\t}\n\n\t\treturn res, dists, nil\n\t}\n\n\tres, err := hybrid.Search(ctx, &hybrid.Params{\n\t\tHybridSearch: g.params.Hybrid,\n\t\tKeyword:      nil,\n\t\tClass:        g.params.ClassName.String(),","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/repos/db/aggregator/grouper.go#L119-L155","documentation":"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'.","triggerScenarios":"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.","commonSituations":"Damaged or compacting LSM inverted indexes, searching a class whose searchable properties configuration changed, or shard unavailability on a node.","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."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// ensure collection has text/searchable properties and healthy shards before hybrid aggregation\nif len(class.Properties) == 0 { skip sparse leg }","typeGuard":null,"tryCatchPattern":"err := runHybridAggregate(); if errors.Is/contains inverted-index or shard errors { retry with backoff; then trigger shard repair }","preventionTips":["Keep LSM compaction and shard health monitored","Validate stopword/tokenizer configuration in InvertedIndexConfig","Avoid modifying searchable properties during heavy aggregation load"],"tags":["aggregation","bm25","inverted-index","hybrid-search"],"backgroundTag":"bm25-sparse-search-failed","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}