{"record":{"id":"668f4a6dc1b87112","repo":"weaviate/weaviate","slug":"nested-containsnone-meta-bucket-for-q-not-found","errorCode":null,"errorMessage":"nested ContainsNone: meta bucket for %q not found","messagePattern":"nested ContainsNone: meta bucket for %q not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"adapters/repos/db/inverted/prop_value_pairs_nested.go","lineNumber":188,"sourceCode":"// fetchNestedContainsNone resolves a ContainsNone filter on a nested\n// scalar-array path (text[], int[], etc.) or single-value scalar. Strict\n// existential semantics: a doc matches iff ∃ a position at the operand's\n// path whose value is NOT in the listed set.\n//\n// Implementation: read `_exists.{relPath}` as the universe (restricted by\n// any arr[N] pins on this pv); compute operand = OR over each value's\n// bitmap (with multi-token text values AndAll'd through their tokenization\n// wrapper child); strict-existential = universe AndNot operand; strip to\n// docIDs.\n//\n// The universe is the operand's own scalar-array path — `_exists.tags` for\n// `country.tags`, never `_exists.\"\"`. This means sibling-branch leaves\n// (e.g. `cities`) and phantom leaves from empty containers cannot leak\n// through the AndNot.\nfunc (pv *propValuePair) fetchNestedContainsNone(ctx context.Context, s *Searcher) (*docBitmap, error) {\n\tmetaBucket := s.store.Bucket(helpers.BucketNestedMetaFromPropNameLSM(pv.prop))\n\tif metaBucket == nil {\n\t\treturn nil, errors.Errorf(\"nested ContainsNone: meta bucket for %q not found\", pv.prop)\n\t}\n\tif len(pv.children) == 0 {\n\t\treturn nil, errors.Errorf(\"nested ContainsNone: no values for %q\", pv.prop)\n\t}\n\n\toperand, operandRel, err := pv.collectNestedContainsOperand(ctx, s)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer operandRel()\n\n\tuniverseRaw, universeRel, err := metaBucket.RoaringSetGet(ctx, invnested.ExistsKey(pv.nested.relPath))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"nested ContainsNone: read exists key for %q: %w\", pv.nested.relPath, err)\n\t}\n\tuniverse, err := pv.restrictByNestedIdx(ctx, s, &docBitmap{docIDs: universeRaw, release: universeRel})\n\tif err != nil {\n\t\treturn nil, err","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/repos/db/inverted/prop_value_pairs_nested.go#L170-L206","documentation":"fetchNestedContainsNone needs the nested meta bucket to compute which docs contain a nested element and remove matches via AndNot. A nil bucket means the nested field's existence index is missing, so ContainsNone cannot be evaluated. Weaviate throws instead of returning an over- or under-inclusive result set.","triggerScenarios":"A ContainsNone filter on a nested array/object property (e.g. path [\"country\",\"tags\"]) where s.store.Bucket(BucketNestedMetaFromPropNameLSM(prop)) returns nil — nested property not indexed or shard predates nested-index support.","commonSituations":"Post-upgrade query on a collection imported with an older version lacking nested meta buckets; nested property added but reindex not run; multi-tenant shard created before nested indexing was enabled.","solutions":["Reindex the collection so the nested meta bucket exists (or recreate and reimport the data)","Confirm the nested property is indexed (indexFilterable: true) in the current schema","Check that all tenants/shards were reindexed, not just the default shard","Upgrade to a Weaviate version with nested ContainsNone support end-to-end before issuing the query"],"exampleFix":"// before\n{\"path\": [\"country\",\"tags\"], \"operator\": \"ContainsNone\", \"valueText\": [\"x\"]} // no nested meta bucket\n// after\n// reindex/recreate the collection with nested indexing enabled, then rerun the ContainsNone filter","handlingStrategy":"validation","validationCode":"if !nestedMetaBucketExists(store, propName) {\n    return fmt.Errorf(\"ContainsNone on %s requires nested index; reindex collection\", propName)\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"nested ContainsNone: meta bucket\") {\n    logger.Warnf(\"nested index missing for %s; skipping filter or reindexing\", propName)\n}","preventionTips":["Enable nested indexing on array/object properties used in ContainsNone","Reindex after schema upgrades before running nested filters","Confirm the property path points to the indexed nested array","Test nested filters against a fresh collection first"],"tags":["weaviate","nested","contains-none","inverted-index"],"backgroundTag":"property-not-indexed","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"}