Expand description
Bidirectional binding between HNSW node ids and document ids.
Each HNSW index (keyed by its index key: "{collection}" for the base
vector, "{collection}:{field}" for a named one) binds every document id
to at most one live node, and every node to one document id. Both
directions live behind one type, so no caller can update one side only.
Bindings are grouped per index key rather than flattened into
"{index_key}:{node}" strings. A flat string key makes chat a prefix of
chat2:* and of the named key chat:field:*, so a prefix match leaks
nodes of one index into another. The flat form survives only as the
persisted layout (VectorIdMap::to_entries / VectorIdMap::from_entries).
Structs§
- Attached
Vectors - The vectors attached to one document id of one collection.
- Index
IdMap - The node ↔ document bindings of one HNSW index.
- Vector
IdMap - The node ↔ document bindings of every HNSW index, keyed by index key.
Functions§
- persisted_
index_ key - The index key of one persisted binding: its composite key minus the
":{node}"suffix.Nonewhen the composite key does not end in its own node id.
Type Aliases§
- Persisted
IdEntry - One persisted binding:
("{index_key}:{node}", doc_id, node).