package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

DecodeChildKey decodes a child key from the given byte slice.
DecodePartitionMetadata decodes the metadata for a partition.
DecodeRaBitQVectorToSet decodes a RaBitQ vector entry into the given RaBitQuantizedVectorSet.
DecodeUnquantizedVectorToSet decodes a full vector entry into the given UnQuantizedVectorSet.
EncodeChildKey encodes a child key into the given byte slice.
EncodedPartitionKeyLen returns the number of bytes needed to encode the partition key.
EncodePartitionKey encodes a partition key into the given byte slice.
EncodePartitionMetadata encodes the metadata for a partition.
EncodeRaBitQVector encodes a RaBitQ vector into the given byte slice.
EncodeUnquantizedVector encodes a full vector into the given byte slice.
LoadInMemoryStore loads the in-memory store from bytes that were previously saved by MarshalBinary.
NewInMemoryStore constructs a new in-memory store for vectors of the given size.
NewPartition constructs a new partition.
NewPersistentStore creates a vecstore.Store interface backed by the KV for a single vector index.
NewPersistentStoreTxn wraps a PersistentStore transaction around a kv transaction for use with the vecstore API.

# Constants

InvalidKey is the default (invalid) value for a partition key.
InvalidLevel is the default (invalid) value for a K-means tree level.
LeafLevel is the well-known identifier for the K-means leaf level.
RootKey is the well-known identifier for the root partition.
SecondLevel is the well-known identifier for the level above the leaf level.

# Variables

ErrPartitionNotFound is returned by the store when the requested partition cannot be found because it has been deleted by another agent.
ErrRestartOperation is returned by the store when it needs the last index operation (e.g.

# Structs

InMemoryStore implements the Store interface over in-memory partitions and vectors.
Partition contains a set of quantized vectors that are clustered around a centroid in some level of the K-means tree.
PersistentStore implements the Store interface for KV backed vector indices.
SearchResult contains a set of results from searching partitions for data vectors that are nearest to a query vector.
SearchSet incrementally maintains the nearest candidates that result from searching a partition for the data vectors that are nearest to a query vector.
SearchStats tracks useful information about searches, such as how many vectors and partitions were scanned.
VectorWithKey contains a original, full-size vector and its referencing key.

# Interfaces

Store encapsulates the component that’s actually storing the vectors, whether that’s in a CRDB cluster for production or in memory for testing and benchmarking.
Txn enables callers to make changes to the stored index in a transactional context.

# Type aliases

Level specifies a level in the K-means tree.
PartitionKey uniquely identifies a partition.
PrimaryKey points to the unique row in the primary index that contains the indexed vector.
SearchResults is a list of search results from the search set.