{"record":{"id":"0eba93e4a3ff9f78","repo":"weaviate/weaviate","slug":"updating-inverted-index-config","errorCode":null,"errorMessage":"updating inverted index config","messagePattern":"updating inverted index config","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"adapters/repos/db/index.go","lineNumber":1329,"sourceCode":"\ti.invertedIndexConfigLock.Lock()\n\tdefer i.invertedIndexConfigLock.Unlock()\n\n\ti.invertedIndexConfig = updated\n\n\terr := i.stopwords.ReplaceDetectorFromConfig(updated.Stopwords)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"update inverted index config: %w\", err)\n\t}\n\n\tpresetDetectors, err := stopwords.BuildPresetDetectors(updated.StopwordPresets)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"update inverted index config: %w\", err)\n\t}\n\ti.stopwordProvider.Store(stopwords.NewProvider(i.stopwords, presetDetectors))\n\n\terr = tokenizer.AddCustomDict(i.Config.ClassName.String(), updated.TokenizerUserDict)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"updating inverted index config\")\n\t}\n\n\treturn nil\n}\n\n// getStopwordProvider returns the current stopword provider, which bundles\n// the collection-level fallback detector and the cached user-defined preset\n// detectors. Safe for concurrent use without invertedIndexConfigLock.\nfunc (i *Index) getStopwordProvider() *stopwords.Provider {\n\treturn i.stopwordProvider.Load()\n}\n\nfunc (i *Index) asyncReplicationGloballyDisabled() bool {\n\tif i.globalreplicationConfig == nil {\n\t\treturn false\n\t}\n\treturn i.globalreplicationConfig.AsyncReplicationDisabled.Get()\n}","sourceCodeStart":1311,"sourceCodeEnd":1347,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/repos/db/index.go#L1311-L1347","documentation":"Updating the inverted-index config of an existing class failed: the new config was assigned and then a derived step broke — rebuilding the stopword detector from config, building preset detectors, or installing the custom tokenizer dictionary. The in-memory config may be half-applied (lock held during the whole update mitigates concurrent reads).","triggerScenarios":"Thrown at adapters/repos/db/index.go:1329 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the wrapped cause: invalid stopword preset, bad user dictionary, or tokenizer config","Correct the offending part of the invertedIndexConfig update","Retry the schema update after fixing; verify stopwords/tokenizer behave on a test class first"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}