weaviate/weaviate · error

nested ContainsNone: meta bucket for %q not found

Error message

nested ContainsNone: meta bucket for %q not found

What it means

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.

Source

Thrown at adapters/repos/db/inverted/prop_value_pairs_nested.go:188

// fetchNestedContainsNone resolves a ContainsNone filter on a nested
// scalar-array path (text[], int[], etc.) or single-value scalar. Strict
// existential semantics: a doc matches iff ∃ a position at the operand's
// path whose value is NOT in the listed set.
//
// Implementation: read `_exists.{relPath}` as the universe (restricted by
// any arr[N] pins on this pv); compute operand = OR over each value's
// bitmap (with multi-token text values AndAll'd through their tokenization
// wrapper child); strict-existential = universe AndNot operand; strip to
// docIDs.
//
// The universe is the operand's own scalar-array path — `_exists.tags` for
// `country.tags`, never `_exists.""`. This means sibling-branch leaves
// (e.g. `cities`) and phantom leaves from empty containers cannot leak
// through the AndNot.
func (pv *propValuePair) fetchNestedContainsNone(ctx context.Context, s *Searcher) (*docBitmap, error) {
	metaBucket := s.store.Bucket(helpers.BucketNestedMetaFromPropNameLSM(pv.prop))
	if metaBucket == nil {
		return nil, errors.Errorf("nested ContainsNone: meta bucket for %q not found", pv.prop)
	}
	if len(pv.children) == 0 {
		return nil, errors.Errorf("nested ContainsNone: no values for %q", pv.prop)
	}

	operand, operandRel, err := pv.collectNestedContainsOperand(ctx, s)
	if err != nil {
		return nil, err
	}
	defer operandRel()

	universeRaw, universeRel, err := metaBucket.RoaringSetGet(ctx, invnested.ExistsKey(pv.nested.relPath))
	if err != nil {
		return nil, fmt.Errorf("nested ContainsNone: read exists key for %q: %w", pv.nested.relPath, err)
	}
	universe, err := pv.restrictByNestedIdx(ctx, s, &docBitmap{docIDs: universeRaw, release: universeRel})
	if err != nil {
		return nil, err

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Reindex the collection so the nested meta bucket exists (or recreate and reimport the data)
  2. Confirm the nested property is indexed (indexFilterable: true) in the current schema
  3. Check that all tenants/shards were reindexed, not just the default shard
  4. Upgrade to a Weaviate version with nested ContainsNone support end-to-end before issuing the query

Example fix

// before
{"path": ["country","tags"], "operator": "ContainsNone", "valueText": ["x"]} // no nested meta bucket
// after
// reindex/recreate the collection with nested indexing enabled, then rerun the ContainsNone filter
Defensive patterns

Strategy: validation

Validate before calling

if !nestedMetaBucketExists(store, propName) {
    return fmt.Errorf("ContainsNone on %s requires nested index; reindex collection", propName)
}

Try / catch

if err != nil && strings.Contains(err.Error(), "nested ContainsNone: meta bucket") {
    logger.Warnf("nested index missing for %s; skipping filter or reindexing", propName)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04). Data as JSON: /api/errors/668f4a6dc1b87112. Report an issue: GitHub.