weaviate/weaviate · error

property ' ' not found in schema

Error message

property '%s' not found in schema

What it means

Thrown during a batch reference add operation (`storeSingleBatchInLSM` inside `storeInObjectStore`) when the property named by the reference's `from` field (e.g. `Article {hasAuthor: ...}`) does not exist in the target class's schema. The batcher looks up the property in a `propsByName` map built from the read-only schema (`getSchemaPropsByName`); the merge of the reference into the target object still succeeds up to that point, but the inverted-index ref-count update cannot proceed, so the reference at that batch index fails. This indicates a client-side schema mismatch: the property is misspelled, was never created, or was deleted.

Solutions

  1. Check the property name in `from` exactly matches a property of the source class: run the GraphQL `__type { ...Obj }` introspection query or `GET /v1/schema/{className}` and compare names (property names are case-sensitive).
  2. Create the missing property first via `POST /v1/schema/{className}/properties`, then re-submit the failed references.
  3. Fix misspellings/case in the import script; a failed reference leaves the merge undone, so re-run those entries after correction.
  4. If the property was recently deleted or renamed, regenerate the batch from the current schema instead of a cached copy.
  5. For partial batch results, use per-reference error handling: Weaviate returns an error per batch index — requeue only the failing indices.

Example fix

// before
client.Batch().ReferencesBatcher().WithReference(&models.BatchReference{
    From:  "weaviate://localhost/Article/hasAuthors", // typo: property is hasAuthor
    To:    "weaviate://localhost/Author/...",
}).Do(ctx) // -> property 'hasAuthors' not found in schema

// after
schema, _ := client.Schema().Getter().WithClassName("Article").Do(ctx)
for _, p := range schema.Properties {
    fmt.Println(p.Name) // verify exact name before batching
}
client.Batch().ReferencesBatcher().WithReference(&models.BatchReference{
    From: "weaviate://localhost/Article/hasAuthor",
    To:   "weaviate://localhost/Author/...",
}).Do(ctx)
Defensive patterns

Strategy: validation

Validate before calling

func assertRefPropsExist(ctx context.Context, client *weaviate.Client, class string, props []string) error {
    schema, err := client.Schema().Getter().WithClassName(class).Do(ctx)
    if err != nil {
        return err
    }
    have := map[string]bool{}
    for _, p := range schema.Properties {
        have[p.Name] = true
    }
    for _, want := range props {
        if !have[want] {
            return fmt.Errorf("class %s has no property %q", class, want)
        }
    }
    return nil
}

Try / catch

_, err := refsBatcher.Do(ctx)
if err != nil {
    var we *weaviate.WeaviateClientError
    if errors.As(err, &we) && strings.Contains(we.Msg, "not found in schema") {
        // re-fetch schema, fix/queue the failing references, do not blind-retry
        return refreshSchemaAndRequeue(failedRefs)
    }
    return err
}

Prevention

When it happens

Trigger: Calling the batch references API (REST `/v1/batch/references`) with `from` pointing to a property name that is not defined in the schema of the `from` class — e.g. `from: weaviate://localhost/Article/hasAuthors` when the property is actually `hasAuthor`, or referencing a property on the wrong class, or after the property was removed concurrently while a batch was in flight.

Common situations: Typos in property names in bulk import scripts; generating reference batches from a stale schema snapshot after a migration deleted/renamed the property; multi-tenant setups where the reference batch targets a class whose schema differs from what the client assumed; case-sensitivity mistakes (`hasauthor` vs `hasAuthor`).

Related errors


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

Appendix: source

Thrown at adapters/repos/db/shard_write_batch_references.go:154

			errLock.Unlock()
			continue
		}

		// The merge above bumped the object past a live reindex watermark; mirror
		// its co-located props so the backfill scan's skip stays lossless.
		if err := b.mirrorColocatedPropsForReindex(res); err != nil {
			func() {
				errLock.Lock()
				defer errLock.Unlock()
				errs[i] = err
			}()
			continue
		}

		prop, ok := propsByName[ref.From.Property.String()]
		if !ok {
			errLock.Lock()
			errs[i] = fmt.Errorf("property '%s' not found in schema", ref.From.Property)
			errLock.Unlock()
			continue
		}

		// generally the batch ref is an append only change which does not alter
		// the vector position. There is however one inverted index link that needs
		// to be cleanup: the ref count
		if err := b.analyzeInverted(invertedMerger, res, ref, prop); err != nil {
			errLock.Lock()
			errs[i] = err
			errLock.Unlock()
			continue
		}
	}

	if err := b.writeInverted(invertedMerger.Merge()); err != nil {
		for i := range errs {
			errs[i] = errors.Wrap(err, "write inverted batch")

View on GitHub (pinned to 75aa4b6d11)