{"record":{"id":"b98d1c46310d6fca","repo":"weaviate/weaviate","slug":"property-q-does-not-have-a-rangeable-index-to-reb","errorCode":null,"errorMessage":"property %q does not have a rangeable index to rebuild; use enable to create one","messagePattern":"property %q does not have a rangeable index to rebuild; use enable to create one","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"adapters/handlers/rest/handlers_reindex.go","lineNumber":128,"sourceCode":"\t\t\treturn fmt.Errorf(\"property %q is not a numeric type (int, number, date)\", pn)\n\t\t}\n\t\tif prop.IndexRangeFilters != nil && *prop.IndexRangeFilters {\n\t\t\treturn fmt.Errorf(\"property %q already has indexRangeFilters enabled\", pn)\n\t\t}\n\t}\n\treturn nil\n}\n\n// validateRebuildRangeableProperty is the inverse-precondition counterpart\n// of validateRangeableProperties: the property must already have rangeable\n// indexing enabled (otherwise there's nothing to rebuild — the caller\n// wants enable-rangeable instead). Type must still be numeric/date.\nfunc validateRebuildRangeableProperty(prop *models.Property) error {\n\tif !isNumericProperty(prop) {\n\t\treturn fmt.Errorf(\"property %q is not a numeric type (int, number, date)\", prop.Name)\n\t}\n\tif prop.IndexRangeFilters == nil || !*prop.IndexRangeFilters {\n\t\treturn fmt.Errorf(\"property %q does not have a rangeable index to rebuild; use enable to create one\", prop.Name)\n\t}\n\treturn nil\n}\n\n// validateEnableFilterableProperty validates that the property is a\n// suitable target for enable-filterable: it must not already have a\n// filterable index, and its data type must support inverted filtering\n// (everything except blob, geoCoordinates, and references).\nfunc validateEnableFilterableProperty(prop *models.Property) error {\n\tif prop.IndexFilterable != nil && *prop.IndexFilterable {\n\t\treturn fmt.Errorf(\"property %q already has a filterable index\", prop.Name)\n\t}\n\tdt, ok := entschema.AsPrimitive(prop.DataType)\n\tif !ok {\n\t\t// Non-primitive (references) — not supported for filterable enable.\n\t\treturn fmt.Errorf(\"property %q type %v does not support a filterable index\", prop.Name, prop.DataType)\n\t}\n\t// Allow every primitive type EXCEPT the three below. Using a default","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/handlers/rest/handlers_reindex.go#L110-L146","documentation":"A rebuild needs an existing rangeable index to rebuild. If the property's IndexRangeFilters is nil or false, there is no range index, so the request is rejected with guidance to use the enable operation instead.","triggerScenarios":"Calling rebuild-rangeable on a property that has no indexRangeFilters enabled (never enabled, or explicitly disabled).","commonSituations":"Confusing the enable and rebuild operations; property had range filters turned off earlier; new property added but never enabled.","solutions":["Use the enable-rangeable operation first to create the index","Check models.Property.IndexRangeFilters before submitting a rebuild","Ensure you are targeting the correct collection/property (the flag may be set elsewhere)"],"exampleFix":"// before\nrebuildRangeable(class, [\"price\"]) // no index yet\n// after\nenableRangeable(class, [\"price\"]) // creates the index first","handlingStrategy":"validation","validationCode":"const p = schema.properties.find(p => p.name === name); if (p.indexRangeFilters !== true) return enableRangeable(className, [name]); // enable first","typeGuard":"function hasRangeIndex(p) { return p.indexRangeFilters === true }","tryCatchPattern":"try { await rebuildRangeable(className, [name]) } catch (e) { if (String(e).includes(\"does not have a rangeable index\")) await enableRangeable(className, [name]); else throw e }","preventionTips":["Distinguish enable (create) vs rebuild (refresh) operations clearly","Verify IndexRangeFilters is true before scheduling rebuilds","When in doubt, enable first — rebuild only after enable succeeded"],"tags":["reindex","schema","precondition"],"backgroundTag":"missing-precondition","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"}