Liking cljdoc? Tell your friends :D

hive-milvus.store.routing

Per-type collection routing for Milvus.

Bridges the injected embedding port's type→provider routing (port/routing-for-type) to Milvus collection naming (underscores, no hyphens). Each provider dimension lives in its own Milvus collection so dual-run migrations (e.g. nomic 768-d → qwen3-embedding:0.6b 1024-d) coexist without schema conflict — Milvus collections have immutable dimension at create time.

Collection-name conventions:

  • Default 768-d collection: hive_mcp_memory (legacy name preserved)
  • Per-dim collections: hive_mcp_memory_<dim>d

Reads without a type opt fan out across all known collections; writes are routed to the entry's type's collection and auto-create on first use via index/ensure-collection!.

Per-type collection routing for Milvus.

Bridges the injected embedding port's type→provider routing
(`port/routing-for-type`) to Milvus collection naming (underscores,
no hyphens). Each provider dimension lives in its own Milvus collection
so dual-run migrations (e.g. nomic 768-d → qwen3-embedding:0.6b 1024-d)
coexist without schema conflict — Milvus collections have immutable
dimension at create time.

Collection-name conventions:

- Default 768-d collection: `hive_mcp_memory` (legacy name preserved)
- Per-dim collections:      `hive_mcp_memory_<dim>d`

Reads without a type opt fan out across all known collections; writes
are routed to the entry's type's collection and auto-create on first
use via `index/ensure-collection!`.
raw docstring

all-known-collectionsclj

(all-known-collections)

Milvus collections backing the currently configured embedding providers. Derived from port/collection-names so reads cover exactly the spaces writes can produce.

Milvus collections backing the currently configured embedding providers.
Derived from `port/collection-names` so reads cover exactly the spaces
writes can produce.
sourceraw docstring

coll-for-entryclj

(coll-for-entry entry)

Resolve the routed Milvus collection for an entry map. Size-aware: oversized content escalates to the bigger provider's collection so the stored vector's dimension matches. No-embed types (structurally-addressed blobs) route to their default-provider collection — a zero placeholder vector of that dimension is stored by embed-for-entry.

Resolve the routed Milvus collection for an entry map. Size-aware: oversized
content escalates to the bigger provider's collection so the stored vector's
dimension matches. No-embed types (structurally-addressed blobs) route to
their default-provider collection — a zero placeholder vector of that
dimension is stored by `embed-for-entry`.
sourceraw docstring

coll-for-typeclj

(coll-for-type memory-type)

Resolve {:collection-name str :dimension int :max-tokens int :provider-key kw} for a memory type via the global embedder routing. Falls back to the legacy default 768-d collection when routing cannot resolve.

Resolve `{:collection-name str :dimension int :max-tokens int :provider-key kw}`
for a memory type via the global embedder routing. Falls back to the
legacy default 768-d collection when routing cannot resolve.
sourceraw docstring

coll-for-type+sizeclj

(coll-for-type+size memory-type content)

Like coll-for-type but size-aware: when content overflows the type's routed provider, escalates to the bigger-context provider's collection so the stored vector's dimension matches what embed-for-entry will produce.

Like `coll-for-type` but size-aware: when `content` overflows the type's
routed provider, escalates to the bigger-context provider's collection so
the stored vector's dimension matches what `embed-for-entry` will produce.
sourceraw docstring

ensure-routed!clj

(ensure-routed! memory-type)

Ensure the routed Milvus collection exists with the correct dimension and is loaded + scalar-indexed. Returns the collection name.

Ensure the routed Milvus collection exists with the correct dimension
and is loaded + scalar-indexed. Returns the collection name.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close