Liking cljdoc? Tell your friends :D

hive-milvus.collection.protocol

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.
raw docstring

ICollectionEnsurecljprotocol

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!clj

(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.
sourceraw docstring

ICollectionLocatorcljprotocol

Pure routing of ProviderSpec to a Milvus CollectionRef.

Pure routing of `ProviderSpec` to a Milvus `CollectionRef`.

active-collectionsclj

(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-forclj

(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-collectionsclj

(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.
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