L1 pure — collection-name derivation.
Two pure functions:
chroma-name : dim → Chroma collection name.
768 stays on the legacy hive-mcp-memory; other
dims get the -<dim>d suffix.milvus-name : Chroma name → Milvus name (underscores not
hyphens). Idempotent — a name already in Milvus
form passes through. Reuses
hive-milvus.collections/collection->milvus-name
so the two definitions cannot drift.Why this lives outside routing.clj: SRP. Routing is about
resolving a ProviderSpec; naming is about projecting a dim to a
string. The L2 locator composes both.
L1 pure — collection-name derivation.
Two pure functions:
- `chroma-name` : dim → Chroma collection name.
768 stays on the legacy `hive-mcp-memory`; other
dims get the `-<dim>d` suffix.
- `milvus-name` : Chroma name → Milvus name (underscores not
hyphens). Idempotent — a name already in Milvus
form passes through. Reuses
`hive-milvus.collections/collection->milvus-name`
so the two definitions cannot drift.
Why this lives outside `routing.clj`: SRP. Routing is about
resolving a `ProviderSpec`; naming is about projecting a dim to a
string. The L2 locator composes both.(chroma-name dim)Pure — dim → Chroma collection name. 768 → hive-mcp-memory.
Otherwise hive-mcp-memory-<dim>d. Throws on non-positive dim
so a programming error fails at the construction site.
Pure — dim → Chroma collection name. 768 → `hive-mcp-memory`. Otherwise `hive-mcp-memory-<dim>d`. Throws on non-positive dim so a programming error fails at the construction site.
(dim-of coll-name)Pure — inverse of chroma-name: the dimension the vectors of
coll-name carry, read back from the name. Accepts both the
Chroma (-2560d) and Milvus (_2560d) spellings. nil when the
name is not a memory collection, so a caller can tell 'unknown'
from 'known and 768'.
Pure — inverse of `chroma-name`: the dimension the vectors of `coll-name` carry, read back from the name. Accepts both the Chroma (`-2560d`) and Milvus (`_2560d`) spellings. nil when the name is not a memory collection, so a caller can tell 'unknown' from 'known and 768'.
Legacy Chroma name preserved for backward compatibility with pre-multi-dim data living in 768-d. Once the relocator drains this collection, the locator can mark it sunset and reads can exclude it.
Legacy Chroma name preserved for backward compatibility with pre-multi-dim data living in 768-d. Once the relocator drains this collection, the locator can mark it sunset and reads can exclude it.
Dimension of legacy-base-collection. Hard-coded because the
migration sits at 768 — any other dim already lives in a
-<dim>d-suffixed collection.
Dimension of `legacy-base-collection`. Hard-coded because the migration sits at 768 — any other dim already lives in a `-<dim>d`-suffixed collection.
(milvus-name chroma-coll-name)Pure — Chroma name → Milvus name (- becomes _). Idempotent:
"hive_mcp_memory_1024d" returns unchanged. Delegates to
hive-milvus.collections/collection->milvus-name so the canonical
transform lives in one place.
Pure — Chroma name → Milvus name (`-` becomes `_`). Idempotent: `"hive_mcp_memory_1024d"` returns unchanged. Delegates to `hive-milvus.collections/collection->milvus-name` so the canonical transform lives in one place.
(ref-for-dim dim)Pure — dim → CollectionRef map. Computes both Chroma and Milvus
names. The :coll/sunset? flag defaults to false; the locator
layer flips it on for legacy collections during drain.
Pure — dim → `CollectionRef` map. Computes both Chroma and Milvus names. The `:coll/sunset?` flag defaults to false; the locator layer flips it on for legacy collections during drain.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |