Liking cljdoc? Tell your friends :D

hive-milvus.relocate.promoters.record

PROMOTE: wrap the embedder BOUNDARY call + the pure schema record builder into a Result-tracked promoter. The single caller (the pipeline) gets one r/ok / r/err to thread through.

Why this is a promoter even though it touches the embedder: embed-for-entry returns Result; from the pipeline's POV the embedding is just data flowing through the bundle. The actual I/O (HTTP call to Ollama) is encapsulated in the embedder ns; here we only orchestrate.

PROMOTE: wrap the embedder BOUNDARY call + the pure schema record
builder into a Result-tracked promoter. The single caller (the
pipeline) gets one r/ok / r/err to thread through.

Why this is a promoter even though it touches the embedder:
`embed-for-entry` returns Result; from the pipeline's POV the
embedding is just data flowing through the bundle. The actual
I/O (HTTP call to Ollama) is encapsulated in the embedder ns;
here we only orchestrate.
raw docstring

build-target-recordclj

(build-target-record {:keys [entry target-coll kept-embedding] :as bundle})

Re-embed the entry under the target collection's routing-aligned provider, then build the Milvus insert record. A bundle carrying :kept-embedding (the stored vector, still valid per vector-still-valid?) is built on it and the embedder is not called.

Bundle in: {:entry e :target-coll s :kept-embedding v? …} Bundle out: same plus {:embedding v :record m}

Returns r/err :embedder/* on embed failure (propagated from hive-milvus.embedder/embed-for-entry).

Re-embed the entry under the target collection's routing-aligned
provider, then build the Milvus insert record. A bundle carrying
`:kept-embedding` (the stored vector, still valid per
`vector-still-valid?`) is built on it and the embedder is not called.

Bundle in:  {:entry e :target-coll s :kept-embedding v? …}
Bundle out: same plus {:embedding v :record m}

Returns r/err :embedder/* on embed failure (propagated from
`hive-milvus.embedder/embed-for-entry`).
sourceraw docstring

vector-still-valid?clj

(vector-still-valid? {:keys [src-coll target-coll existing entry]})

True when the vector stored for :existing is the one :entry would get: the row stays in its collection and the text the embedder would read is unchanged. A rewrite that only changes what is stored (a store decorator sealing :content and handing over the same plaintext as :embed-text) then keeps its vector instead of paying a re-embed.

True when the vector stored for `:existing` is the one `:entry` would get:
the row stays in its collection and the text the embedder would read is
unchanged. A rewrite that only changes what is stored (a store decorator
sealing `:content` and handing over the same plaintext as `:embed-text`)
then keeps its vector instead of paying a re-embed.
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