{"record":{"id":"328507a7d0c34745","repo":"chroma-core/chroma","slug":"unknown-hnsw-parameter-param","errorCode":null,"errorMessage":"Unknown HNSW parameter: {param}","messagePattern":"Unknown HNSW parameter: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"chromadb/segment/impl/vector/hnsw_params.py","lineNumber":41,"sourceCode":"}\n\n\nclass Params:\n    @staticmethod\n    def _select(metadata: Metadata) -> Dict[str, Any]:\n        segment_metadata = {}\n        for param, value in metadata.items():\n            if param.startswith(\"hnsw:\"):\n                segment_metadata[param] = value\n        return segment_metadata\n\n    @staticmethod\n    def _validate(metadata: Dict[str, Any], validators: Dict[str, Validator]) -> None:\n        \"\"\"Validates the metadata\"\"\"\n        # Validate it\n        for param, value in metadata.items():\n            if param not in validators:\n                raise ValueError(f\"Unknown HNSW parameter: {param}\")\n            if not validators[param](value):\n                raise ValueError(f\"Invalid value for HNSW parameter: {param} = {value}\")\n\n\nclass HnswParams(Params):\n    space: str\n    construction_ef: int\n    search_ef: int\n    M: int\n    num_threads: int\n    resize_factor: float\n\n    def __init__(self, metadata: Metadata):\n        metadata = metadata or {}\n        self.space = str(metadata.get(\"hnsw:space\", \"l2\"))\n        self.construction_ef = int(metadata.get(\"hnsw:construction_ef\", 100))\n        self.search_ef = int(metadata.get(\"hnsw:search_ef\", 100))\n        self.M = int(metadata.get(\"hnsw:M\", 16))","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/segment/impl/vector/hnsw_params.py#L23-L59","documentation":"Raised by HNSW Params._validate when segment metadata contains an hnsw:* parameter that is not in the known validator set — e.g. a typo like 'hnsw:Ef_constrution' or a parameter the installed HNSW build does not accept.","triggerScenarios":"Thrown at chromadb/segment/impl/vector/hnsw_params.py:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use valid hnsw: parameters such as hnsw:space, hnsw:construction_ef, hnsw:search_ef, hnsw:M, hnsw:num_threads, hnsw:resize_factor, hnsw:sync_threshold, hnsw:batch_size","Check the parameter name spelling after the hnsw: prefix","Remove the parameter if it is not supported by this Chroma version"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","contentChangedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}