Liking cljdoc? Tell your friends :D

hive-milvus.storage.protocol

L0 contract — storage bounded context.

Two narrow protocols (ISP):

  • IVectorWrite — upsert one or more entries to a CollectionRef.
  • IVectorRead — search across one or more CollectionRefs with fan-out semantics (read may union results from active + sunset collections during drain).

Both protocols depend only on ICollectionLocator (via the ref) — they have zero coupling to embedder or router internals. The write pipeline (in storage/write_*.clj) is responsible for resolving spec → ref BEFORE calling upsert!; this layer never derives a collection from a raw type.

Reload-safety: defonce-guarded.

L0 contract — storage bounded context.

Two narrow protocols (ISP):

- `IVectorWrite` — upsert one or more entries to a `CollectionRef`.
- `IVectorRead`  — search across one or more `CollectionRef`s with
                  fan-out semantics (read may union results from
                  active + sunset collections during drain).

Both protocols depend only on `ICollectionLocator` (via the ref) —
they have zero coupling to embedder or router internals. The write
pipeline (in `storage/write_*.clj`) is responsible for resolving
spec → ref BEFORE calling `upsert!`; this layer never derives a
collection from a raw type.

Reload-safety: `defonce`-guarded.
raw docstring

IVectorReadcljprotocol

Read fan-out across collections.

Read fan-out across collections.
(search this refs query opts)

Search across refs (sequence of CollectionRef) with the given query (a vector matching at least one ref's dim). Returns a Result of merged hits. Implementations MUST skip refs whose dim does not match the query's dim — fan-out across multiple dims is a caller error, surfaced via :err/tag :storage/dim-mismatch-query.

Search across `refs` (sequence of `CollectionRef`) with the
given `query` (a vector matching at least one ref's dim).
Returns a `Result` of merged hits. Implementations MUST skip
refs whose dim does not match the query's dim — fan-out across
multiple dims is a caller error, surfaced via
`:err/tag :storage/dim-mismatch-query`.
sourceraw docstring

IVectorWritecljprotocol

Mutating writes to one collection at a time.

Mutating writes to one collection at a time.

upsert!clj

(upsert! this ref entries)

Upsert a sequence of entries (each must include :vector of length (:coll/dim ref)) into the collection at (:coll/name ref). Returns a ResultOk {:upserted N} or Err {:err/tag :storage/* :err/cause _}. Schema mismatches (vector dim ≠ ref dim) surface as :err/tag :embedder/dim-mismatch to give callers actionable fix-direction.

Upsert a sequence of `entries` (each must include `:vector` of
length `(:coll/dim ref)`) into the collection at
`(:coll/name ref)`. Returns a `Result` — `Ok {:upserted N}` or
`Err {:err/tag :storage/* :err/cause _}`. Schema mismatches
(vector dim ≠ ref dim) surface as
`:err/tag :embedder/dim-mismatch` to give callers actionable
fix-direction.
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