L0 contract — collection bounded context.
Two narrow protocols (ISP):
ICollectionLocator — spec → CollectionRef. Pure lookup. Knows
sunset state so writes can avoid retired
collections while reads can fan out across
both active + sunset (graceful drain).ICollectionEnsure — create-if-missing on the backend with
mandatory dim-check. Rejects an ensure!
whose ref-dim disagrees with an existing
collection's dim — the precise check that
prevents the silent 1804 schema-mismatch.Reload-safety: defonce-guarded.
L0 contract — collection bounded context.
Two narrow protocols (ISP):
- `ICollectionLocator` — spec → `CollectionRef`. Pure lookup. Knows
sunset state so writes can avoid retired
collections while reads can fan out across
both active + sunset (graceful drain).
- `ICollectionEnsure` — create-if-missing on the backend with
mandatory dim-check. Rejects an `ensure!`
whose ref-dim disagrees with an existing
collection's dim — the precise check that
prevents the silent 1804 schema-mismatch.
Reload-safety: `defonce`-guarded.Effectful sibling — creates a Milvus collection if missing, rejects dim mismatches on existing collections.
Effectful sibling — creates a Milvus collection if missing, rejects dim mismatches on existing collections.
(ensure! this ref)Idempotent. If the collection named (:coll/name ref) does not
exist, create it with vector dim (:coll/dim ref). If it
exists with a different dim, return
(err {:err/tag :collection/dim-mismatch :ref ref :actual-dim N}).
Returns (ok ref) on success.
Idempotent. If the collection named `(:coll/name ref)` does not
exist, create it with vector dim `(:coll/dim ref)`. If it
exists with a different dim, return
`(err {:err/tag :collection/dim-mismatch :ref ref :actual-dim N})`.
Returns `(ok ref)` on success.Pure routing of ProviderSpec to a Milvus CollectionRef.
Pure routing of `ProviderSpec` to a Milvus `CollectionRef`.
(active-collections this)Sequence of CollectionRef for collections that should accept
writes. Excludes sunset entries.
Sequence of `CollectionRef` for collections that should accept writes. Excludes sunset entries.
(collection-for this spec)Return the CollectionRef for the given ProviderSpec.
Result shape: {:coll/name str :coll/dim int :coll/sunset? bool}.
Return the `CollectionRef` for the given `ProviderSpec`.
Result shape: `{:coll/name str :coll/dim int :coll/sunset? bool}`.(known-collections this)Sequence of all CollectionRefs including sunset. Used by
search fan-out to ensure legacy data remains queryable during
background drain.
Sequence of all `CollectionRef`s including sunset. Used by search fan-out to ensure legacy data remains queryable during background 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 |