{"record":{"id":"aa26eacd0daf430f","repo":"weaviate/weaviate","slug":"not-an-hfresh-index","errorCode":null,"errorMessage":"not an hfresh index","messagePattern":"not an hfresh index","errorType":"http","errorClass":null,"httpStatus":400,"severity":"warning","filePath":"adapters/handlers/rest/handlers_debug.go","lineNumber":273,"sourceCode":"\t\tif shard == nil {\n\t\t\trelease()\n\t\t\tlogger.WithField(\"shard\", shardName).Error(\"shard not found\")\n\t\t\thttp.Error(w, \"shard not found\", http.StatusNotFound)\n\t\t\treturn\n\t\t}\n\n\t\tvidx, ok := shard.GetVectorIndex(targetVector)\n\t\tif !ok {\n\t\t\trelease()\n\t\t\tlogger.WithField(\"shard\", shardName).Error(\"vector index not found\")\n\t\t\thttp.Error(w, \"vector index not found\", http.StatusNotFound)\n\t\t\treturn\n\t\t}\n\n\t\th, ok := vidx.(hfreshReassignAller)\n\t\tif !ok {\n\t\t\trelease()\n\t\t\thttp.Error(w, \"not an hfresh index\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\n\t\t// The scan needs no shard reference: EnqueueReassignAll also watches\n\t\t// the index's own lifecycle context and stops when the shard shuts\n\t\t// down or is dropped, like the version map warmup does.\n\t\trelease()\n\n\t\treassignLogger := logger.\n\t\t\tWithField(\"collection\", colName).\n\t\t\tWithField(\"shard\", shardName).\n\t\t\tWithField(\"targetVector\", targetVector)\n\n\t\tenterrors.GoWrapper(func() {\n\t\t\tstats, err := h.EnqueueReassignAll(context.Background())\n\t\t\tstatsLogger := reassignLogger.\n\t\t\t\tWithField(\"postings\", stats.Postings).\n\t\t\t\tWithField(\"enqueued\", stats.Enqueued).","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/handlers/rest/handlers_debug.go#L255-L291","documentation":"The found vector index is type-asserted to the hfreshReassignAller interface. If the index implementation does not support reassign-all (i.e. it is HNSW, flat, dynamic — anything but hfresh), the handler returns HTTP 400 \"not an hfresh index\". Requantize/reassign-all is a capability of the hfresh index type only.","triggerScenarios":"POST /debug/index/reassign/vector?...&vector=Z where the shard's vector index for Z is any vector index type other than hfresh — e.g. a standard HNSW index created with the hnsw vectorIndexType, or a flat/dynamic index.","commonSituations":"Collections using the default hnsw index type; admins attempting the reassign procedure on indexes that were never created with the hfresh backend; mixing vector targets where one is hfresh and another is hnsw.","solutions":["Confirm the vector index type in the schema (vectorIndexType). Only hfresh supports this operation.","If requantization is needed on an HNSW index, use its own compression/quantizer endpoints instead of this debug handler.","If hfresh is required, recreate the collection (or a new target vector) with vectorIndexType=hfresh and re-import data."],"exampleFix":"// before (400): index is hnsw\n{\"vectorIndexType\": \"hnsw\"}\n\n// after: use an hfresh target\ncollection vectorIndexType=hfresh, then POST reassign with that vector name","handlingStrategy":"type-guard","validationCode":"async function assertHfresh(base, col) {\n  const cls = await (await fetch(`${base}/v1/schema/${col}`)).json();\n  const types = [cls.vectorIndexType, ...Object.values(cls.vectorConfig || {})\n    .map(v => v.vectorIndexType)].filter(Boolean);\n  if (types.length && !types.every(t => t === \"hfresh\"))\n    throw new Error(`reassign-all requires hfresh; found: ${types.join(\", \")}`);\n}\n","typeGuard":"const isHfresh = (cls) =>\n  cls.vectorIndexType === \"hfresh\" ||\n  Object.values(cls.vectorConfig || {}).every(v => v.vectorIndexType === \"hfresh\");\n","tryCatchPattern":"// 400 here is a capability mismatch — never retry\nif (resp.status === 400 && body === \"not an hfresh index\") {\n  throw new Error(\"Requantize/reassign is only supported for hfresh vector indexes\");\n}","preventionTips":["Check vectorIndexType in the schema before attempting hfresh-only debug operations","Use the hnsw-specific compression endpoints for HNSW quantizer work","Plan recreations with vectorIndexType=hfresh if reassign-all is required"],"tags":["http-400","hfresh","vector-index","type-assertion","unsupported-operation"],"backgroundTag":"unsupported-index-type","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"}