Liking cljdoc? Tell your friends :D

hive-milvus.store.schema

Entry <-> Milvus record conversion and filter expression builders.

Pure functions only — no side effects, no Milvus RPCs. Extracted from hive-milvus.store so the schema/translation layer can be understood (and tested) independently of the connection + resilience machinery.

Entry <-> Milvus record conversion and filter expression builders.

Pure functions only — no side effects, no Milvus RPCs. Extracted from
hive-milvus.store so the schema/translation layer can be understood
(and tested) independently of the connection + resilience machinery.
raw docstring

build-filter-exprclj

(build-filter-expr {:keys [type project-id project-ids tags exclude-tags
                           include-expired?]})

Build a Milvus boolean filter expression from query opts.

Build a Milvus boolean filter expression from query opts.
sourceraw docstring

default-read-fieldsclj

source

Entryclj

Runtime shape of a memory entry produced by record->entry (open map).

Runtime shape of a memory entry produced by record->entry (open map).
sourceraw docstring

entry->recordclj

(entry->record entry collection-name)

LEGACY FACADE — invokes the BOUNDARY embedder then builds the record. Throws if the embedder fails. Prefer the explicit two-step path:

(let [emb-res (embedder/embed-for-entry entry coll)] (if (r/ok? emb-res) (entry->record-pure entry coll (:ok emb-res)) (handle-err emb-res)))

so embedding failures stay railway-tracked instead of escaping as exceptions. This 2-arg arity is retained for back-compat with pre-CPPB-refactor call sites.

LEGACY FACADE — invokes the BOUNDARY embedder then builds the record.
Throws if the embedder fails. Prefer the explicit two-step path:

  (let [emb-res (embedder/embed-for-entry entry coll)]
    (if (r/ok? emb-res)
      (entry->record-pure entry coll (:ok emb-res))
      (handle-err emb-res)))

so embedding failures stay railway-tracked instead of escaping as
exceptions. This 2-arg arity is retained for back-compat with
pre-CPPB-refactor call sites.
sourceraw docstring

entry->record-pureclj

(entry->record-pure entry _collection-name embedding)

PURE: Convert a memory entry + a precomputed embedding vector into a Milvus insert record. Performs NO embedding lookup, NO provider resolution, NO I/O — the caller is responsible for producing the embedding via hive-milvus.embedder/embed-for-entry first.

Splits CPPB stages: this fn is PROMOTE only; the embedding side of the record (BOUNDARY) lives in hive-milvus.embedder. Callers that skip the embed step ship a record with an empty vector (suitable for tests / id-only updates that intentionally don't re-vectorize).

PURE: Convert a memory entry + a precomputed embedding vector into a
Milvus insert record. Performs NO embedding lookup, NO provider
resolution, NO I/O — the caller is responsible for producing the
embedding via `hive-milvus.embedder/embed-for-entry` first.

Splits CPPB stages: this fn is PROMOTE only; the embedding side of
the record (BOUNDARY) lives in `hive-milvus.embedder`. Callers that
skip the embed step ship a record with an empty vector (suitable
for tests / id-only updates that intentionally don't re-vectorize).
sourceraw docstring

feedback->fieldclj

(feedback->field feedback)

Map feedback keyword to entry field name.

Map feedback keyword to entry field name.
sourceraw docstring

helpfulness-mapclj

(helpfulness-map entry)

Build helpfulness ratio map from entry counts.

Build helpfulness ratio map from entry counts.
sourceraw docstring

metadata-read-fieldsclj

source

now-isoclj

(now-iso)

Current ISO 8601 timestamp string.

Current ISO 8601 timestamp string.
sourceraw docstring

record->entryclj

(record->entry row)

Convert a Milvus query result row to a memory entry map.

Convert a Milvus query result row to a memory entry map.
sourceraw docstring

staleness-probabilityclj

(staleness-probability entry)

Calculate staleness probability from alpha/beta parameters.

Calculate staleness probability from alpha/beta parameters.
sourceraw docstring

str->tagsclj

(str->tags s)

Deserialize tags from JSON string.

Deserialize tags from JSON string.
sourceraw docstring

tags->strclj

(tags->str tags)

Serialize tags to JSON string for Milvus VarChar field.

Serialize tags to JSON string for Milvus VarChar field.
sourceraw docstring

try-parse-jsonclj

(try-parse-json s)

Parse JSON string to map/vec, return original on failure.

Parse JSON string to map/vec, return original on failure.
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