Core entry CRUD, query, search, expiry, and status helpers.
Core entry CRUD, query, search, expiry, and status helpers.
What callers may rely on beyond the port. :embed-text: an entry's transient :embed-text is embedded in place of its :content and never stored.
What callers may rely on beyond the port. :embed-text: an entry's transient :embed-text is embedded in place of its :content and never stored.
(collection-outcome fetch coll-name filter-expr limit)One collection's FanOutOutcome for a scalar query: up to limit rows matching
filter-expr, read through FETCH ((fn [filter-expr page-limit] rows)).
A limit above Milvus's per-query cap is served in pages that each stay
within it (enumerate/rows-matching), so a large limit returns rows, never
a failure dressed as an empty result. A collection that cannot be read
yields :rows [] with its :error.
One collection's FanOutOutcome for a scalar query: up to `limit` rows matching `filter-expr`, read through FETCH (`(fn [filter-expr page-limit] rows)`). A `limit` above Milvus's per-query cap is served in pages that each stay within it (`enumerate/rows-matching`), so a large limit returns rows, never a failure dressed as an empty result. A collection that cannot be read yields `:rows []` with its `:error`.
(fan-out outcomes)Fold per-collection OUTCOMES into gathered rows and the failures that make an empty result unreliable.
Pure, and the whole of the isolation policy: a failing collection contributes
whatever rows it managed and is recorded in :failed, rather than sinking
the query or vanishing.
Fold per-collection OUTCOMES into gathered rows and the failures that make an empty result unreliable. Pure, and the whole of the isolation policy: a failing collection contributes whatever rows it managed and is recorded in `:failed`, rather than sinking the query or vanishing.
The rows a fan-out gathered, and the collections whose silence is unexplained
by the data. :failed empty means every collection answered.
The rows a fan-out gathered, and the collections whose silence is unexplained by the data. `:failed` empty means every collection answered.
What one collection contributed to a fan-out: its rows, and — when it could not be reached — the message saying so. Rows and an error are not exclusive; a partial read may carry both.
What one collection contributed to a fan-out: its rows, and — when it could not be reached — the message saying so. Rows and an error are not exclusive; a partial read may carry both.
(query-entries config-atom opts)Fan out a scalar-filter query across every known collection.
Per-collection failures (transient transport drops, missing index,
schema drift on legacy collections) are isolated: the offending coll
contributes [] and the others return their hits. The failure is
logged at WARN so callers don't read a silent empty result as
:limit not respected (the silent-swallow used to surface as the
user-visible bug 20260503012357-7d008e50).
A log line is not something a caller can branch on, so when any coll failed the returned vector also carries
^{:hive-milvus/failed-collections [{:collection name :message str} ...]}
Absent metadata means every collection answered, so an empty result is a fact about the DATA. Present metadata means the emptiness is partly an artifact of the failure, and a caller must not report it as 'nothing stored'.
Effectful boundary only — the isolation policy itself is fan-out.
Fan out a scalar-filter query across every known collection.
Per-collection failures (transient transport drops, missing index,
schema drift on legacy collections) are isolated: the offending coll
contributes [] and the others return their hits. The failure is
logged at WARN so callers don't read a silent empty result as
`:limit not respected` (the silent-swallow used to surface as the
user-visible bug 20260503012357-7d008e50).
A log line is not something a caller can branch on, so when any coll
failed the returned vector also carries
^{:hive-milvus/failed-collections [{:collection name :message str} ...]}
Absent metadata means every collection answered, so an empty result is a
fact about the DATA. Present metadata means the emptiness is partly an
artifact of the failure, and a caller must not report it as 'nothing
stored'.
Effectful boundary only — the isolation policy itself is `fan-out`.(relocate-entry! config-atom id)Move entry id from its current collection to the canonical target.
Implements IMemoryStoreWithRouting/relocate-entry!.
Delegates to hive-milvus.relocate.pipeline/relocate-one, which is
the CPPB-layered (Collect → Promote → Boundary) implementation.
This wrapper unwraps the pipeline's r/ok / r/err result back into
the legacy raw-map shape callers expect:
{:moved? true :from src :to target :id id} on move {:moved? false :from src :to target :id id} on no-op {:moved? false :from nil :to nil :id id :reason :not-found} when the id resolves to no collection {:moved? false :error <category> :id id :detail err-data} when the pipeline returns r/err for any other reason
Migration path: callers that want railway-tracked errors should
call reloc-pipeline/relocate-one directly instead of this
facade — they get an r/ok / r/err with full error context.
Move entry `id` from its current collection to the canonical target.
Implements `IMemoryStoreWithRouting/relocate-entry!`.
Delegates to `hive-milvus.relocate.pipeline/relocate-one`, which is
the CPPB-layered (Collect → Promote → Boundary) implementation.
This wrapper unwraps the pipeline's r/ok / r/err result back into
the legacy raw-map shape callers expect:
{:moved? true :from src :to target :id id} on move
{:moved? false :from src :to target :id id} on no-op
{:moved? false :from nil :to nil :id id :reason :not-found}
when the id resolves to no collection
{:moved? false :error <category> :id id :detail err-data}
when the pipeline returns r/err for any other reason
Migration path: callers that want railway-tracked errors should
call `reloc-pipeline/relocate-one` directly instead of this
facade — they get an r/ok / r/err with full error context.(search-context config-atom)The live collaborators a semantic search runs against.
The live collaborators a semantic search runs against.
(search-similar config-atom query-text opts)Semantic search. Returns entries, best first.
A target that fails is LOGGED, not silently dropped — a search that returns fewer hits because a collection errored used to report success.
Semantic search. Returns entries, best first. A target that fails is LOGGED, not silently dropped — a search that returns fewer hits because a collection errored used to report success.
(target-collection-for _config-atom entry)Resolve the canonical Milvus collection for entry per current
routing config (per-type → per-dim). Returns the collection name
string. Implements IMemoryStoreWithRouting/target-collection-for.
Resolve the canonical Milvus collection for `entry` per current routing config (per-type → per-dim). Returns the collection name string. Implements `IMemoryStoreWithRouting/target-collection-for`.
(update-entry! config-atom id updates)Update an entry's fields. Routing-aware via the CPPB-layered pipeline — when the merged entry's target collection differs from its current collection, the pipeline relocates it transparently.
Delegates to hive-milvus.relocate.pipeline/relocate-update, which
handles the COLLECT → PROMOTE → BOUNDARY flow with proper Result
tracking. This wrapper unwraps the pipeline's r/ok / r/err back
into the legacy raw-map shape callers expect: returns the merged
entry on success, nil when id is unknown, or a raw err map for
downstream errors.
Migration path: callers that want railway-tracked errors should
call reloc-pipeline/relocate-update directly instead of this
facade.
Update an entry's fields. Routing-aware via the CPPB-layered pipeline — when the merged entry's target collection differs from its current collection, the pipeline relocates it transparently. Delegates to `hive-milvus.relocate.pipeline/relocate-update`, which handles the COLLECT → PROMOTE → BOUNDARY flow with proper Result tracking. This wrapper unwraps the pipeline's r/ok / r/err back into the legacy raw-map shape callers expect: returns the merged entry on success, nil when `id` is unknown, or a raw err map for downstream errors. Migration path: callers that want railway-tracked errors should call `reloc-pipeline/relocate-update` directly instead of this facade.
(update-fields-keep-embedding! config-atom id updates)Update entry fields without re-embedding.
Reads the existing record (including its :embedding vector via
query-scalar), merges updates, and upserts in place via
entry->record-pure with the retrieved vector. Suitable for
metadata-only changes (e.g. :kg-incoming back-edge bookkeeping)
where re-running the embedder on unchanged content is wasted work
— and on 4096d Venice that waste blows past the 30 s memory-write
timeout when an add fans out updates to multiple KG targets.
Returns the merged entry on success, nil if id not found in any known collection.
Update entry fields without re-embedding. Reads the existing record (including its :embedding vector via query-scalar), merges `updates`, and upserts in place via `entry->record-pure` with the retrieved vector. Suitable for metadata-only changes (e.g. :kg-incoming back-edge bookkeeping) where re-running the embedder on unchanged content is wasted work — and on 4096d Venice that waste blows past the 30 s memory-write timeout when an add fans out updates to multiple KG targets. Returns the merged entry on success, nil if id not found in any known collection.
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 |