weaviate/weaviate · error

analyzing object

Error message

analyzing object '%s': %w

What it means

This error wraps a failure from shard.AnalyzeObjectForMigrationWithOverlay while a shard-level inverted-index reindex/migration backfills properties by scanning the objects bucket. During backfill each object older than the reindex start time is re-analyzed (with an optional schema overlay for from-scratch strategies) to rebuild its inverted-index entries; if analysis fails for a given object, the scan aborts and the wrapped error is pushed onto the migration channel, failing the whole migration task. It indicates per-object analysis (tokenization, property extraction, schema lookups) failed, not that the object is missing.

Solutions

  1. Read the wrapped inner error (the %w cause) in the logs — it names the real failure (analyzer, property, schema); fix that underlying cause first.
  2. Verify the collection schema matches the migration: the property being reindexed exists with valid tokenization/indexing settings, and no concurrent schema updates are running during the reindex.
  3. Check the specific object (key printed via ik.String()) for corruption; if corrupt, delete/reinsert the object so the scan can proceed.
  4. Restart the reindex/migration after fixing: the tracker's progress checkpoints let it resume from the last processed key.
  5. If caused by an upgrade, ensure the upgrade completed fully (all schema migrations applied) before triggering the inverted reindex.

Example fix

// before: migration aborts on the bad object
props, _, err := shard.AnalyzeObjectForMigrationWithOverlay(obj, schemaOverlay)
if err != nil {
    mdCh <- &migrationData{err: fmt.Errorf("analyzing object '%s': %w", ik.String(), err)}
    break
}

// after: log-and-skip poison objects so the migration completes (deviation only if skipping is acceptable)
props, _, err := shard.AnalyzeObjectForMigrationWithOverlay(obj, schemaOverlay)
if err != nil {
    logger.WithField("key", ik.String()).Warnf("skipping unanalyzable object: %v", err)
    continue
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Before triggering a reindex via schema update, validate the property config is analyzable
props, err := client.Schema.GetProperty(className, propName)
if err != nil { return err }
if props.Tokenization == "" && props.DataType[0] == "text" {
    return fmt.Errorf("property %s has invalid/empty tokenization; fix schema before reindex", propName)
}

Try / catch

res, err := client.Schema.UpdateClassProperty(className, propUpdate)
if err != nil {
    if strings.Contains(err.Error(), "analyzing object") {
        // inner %w cause names the real analyzer/schema failure
        logger.Errorf("reindex failed on object analysis: %v — check tokenization/schema of affected property", err)
        // fix schema or remove corrupt object, then re-trigger; tracker resumes from checkpoint
    }
    return err
}

Prevention

When it happens

Trigger: Running an inverted-index reindex/migration (e.g. after changing a property's tokenization, indexFilterable/indexSearchable flags, or adding a property with index_null_state/property-length indexing) where shard.AnalyzeObjectForMigrationWithOverlay returns an error for a specific object — typically due to a schema/schemaOverlay mismatch for the property, an analyzer/tokenizer lookup failure, or corrupted/unexpected object content during storobj property extraction.

Common situations: Mid-migration schema updates so the live schema and the overlay disagree; a property referenced by the migration was deleted or renamed; custom/invalid tokenizer configuration on a text property; partially written or corrupt objects on disk after a crash; version upgrades where older objects lack fields the analyzer expects.

Related errors


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

Appendix: source

Thrown at adapters/repos/db/inverted_reindex_task_generic.go:2459

			}
		}

		for ; k != nil; k, v = cursor.Next() {
			ik := keyParse(k)
			obj, err := storobj.FromBinaryOptionalDisk(v, className, addProps, propExtraction)
			if err != nil {
				mdCh <- &migrationData{err: fmt.Errorf("unmarshalling object '%s': %w", ik.String(), err)}
				break
			}

			if obj.LastUpdateTimeUnix() < reindexStarted.UnixMilli() {
				// The overlay is required by from-scratch strategies whose
				// target inverted-index flag is still false on the live
				// schema during backfill. It is nil for retokenize / refresh
				// strategies. See MigrationStrategy.AnalyzerOverlay.
				props, _, err := shard.AnalyzeObjectForMigrationWithOverlay(obj, schemaOverlay)
				if err != nil {
					mdCh <- &migrationData{err: fmt.Errorf("analyzing object '%s': %w", ik.String(), err)}
					break
				}

				if <-breakCh {
					break
				}
				mdCh <- &migrationData{key: ik.Clone(), props: props, docID: obj.DocID}
			} else {
				if <-breakCh {
					break
				}
				mdCh <- &migrationData{key: ik.Clone()}
			}
		}
		if k == nil {
			<-breakCh
			mdCh <- nil
		}

View on GitHub (pinned to 75aa4b6d11)