Documentation
¶
Overview ¶
Package bruteforce provides a simple vector index that answers kNN queries by scanning all vectors and scoring via cosine similarity. It supports a compact binary format for persistence in the vector_storage table.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index is a simple brute-force vector index implementing cosine similarity.
func (*Index) MarshalBinary ¶
MarshalBinary stores: dim(uint32), n(uint32), then for each item: idLen(uint32), id bytes, vec(float32[dim]).
func (*Index) UnmarshalBinary ¶
UnmarshalBinary restores the index from bytes.
Click to show internal directories.
Click to hide internal directories.