MCPcopy Create free account

hub / github.com/Rupamthxt/VectraDB / functions

Functions76 in github.com/Rupamthxt/VectraDB

↓ 9 callersMethodSearch
(query []float32, topK int)
internal/store/shard.go:11
↓ 8 callersMethodAdd
Add's a new node to the HNSW graph, connecting it to existing nodes based on proximity
internal/store/hnsw.go:108
↓ 7 callersMethodDelete
(id string)
internal/store/shard.go:12
↓ 7 callersMethodGet
(id string)
internal/store/db.go:83
↓ 6 callersMethodInsert
(id string, vector []float32, data interface{})
internal/store/shard.go:10
↓ 5 callersMethodClose
Close closes the underlying file of the DiskStore
internal/store/disk.go:82
↓ 5 callersFunctionQuantize
Quantize compresses a float32 vector into an int8 vector
internal/store/quantize.go:12
↓ 4 callersFunctionDistQuantized
DistQuantize calculates the approximate squared Euclidean distance between two vectors natively in int8. This is much faster as integer math is cheape
internal/store/quantize.go:57
↓ 4 callersFunctionNewRaftNode
(shardID int, nodeID string, baseDir string, raftPort int, db *store.VectraDB)
internal/cluster/node.go:28
↓ 4 callersFunctionNewVectraDB
(dim int, storagePath string)
internal/store/db.go:33
↓ 3 callersMethodDequantize
Dequantize unpacks int8 vector back to float32 for precise math
internal/store/quantize.go:45
↓ 3 callersMethodJoin
Join handles join requests and returns a shard for the specific ID to be used by a new node for joining a cluster.
internal/http/handler.go:108
↓ 3 callersFunctionNewCluster
(shards []ShardHandler)
internal/store/shard.go:20
↓ 3 callersMethodsearchLayer
searchLayer finds the closest node to query in a specific layer starting from entry point
internal/store/hnsw.go:71
↓ 2 callersMethodApply
Apply applies a Raft Log Entry to the FSM.
internal/cluster/fsm.go:29
↓ 2 callersMethodGetShard
(id string)
internal/store/shard.go:27
↓ 2 callersMethodWrite
Write appends data to the disk and returns its FileLocation
internal/store/disk.go:50
↓ 2 callersFunctionrandomVector
(dim int)
cmd/benchmark/main.go:237
↓ 2 callersFunctionrandomVector
(dim int)
cmd/loadtest/main.go:116
↓ 2 callersFunctionrunTest
Generic Test Runner to handle Concurrency and Timing
cmd/loadtest/main.go:62
↓ 2 callersFunctionsendRequest
Helper to send HTTP requests
cmd/loadtest/main.go:91
↓ 1 callersMethodGetShardByID
(n int)
internal/store/shard.go:37
↓ 1 callersMethodInsert
(id string, vector []float32, data any)
internal/store/shard.go:44
↓ 1 callersMethodInsertInMemory
(id string, vector []float32)
internal/store/db.go:113
↓ 1 callersMethodLeader
()
internal/http/handler.go:21
↓ 1 callersFunctionNewDiskStore
NewDiskStore initializes a new DiskStore at the given path.
internal/store/disk.go:26
↓ 1 callersFunctionNewFSM
(db *store.VectraDB)
internal/cluster/fsm.go:24
↓ 1 callersFunctionNewHNSWIndex
Return a new HNSW Index Tree
internal/store/hnsw.go:40
↓ 1 callersFunctionNewVectorArena
Initializes arena with a pre allocated capacity
internal/store/arena.go:26
↓ 1 callersMethodRead
Read retrieves data from the disk based on the provided FileLocation
internal/store/disk.go:68
↓ 1 callersMethodSearch
(query []float32, topK int)
internal/store/shard.go:49
↓ 1 callersMethodSize
Returns the total number of vectors stored
internal/store/arena.go:150
↓ 1 callersMethoddown
(i0, n int)
internal/store/heap.go:33
↓ 1 callersMethodrandomLevel
randomLevel generates a level for a new node (Geometric Distribution)
internal/store/hnsw.go:50
↓ 1 callersMethodup
(j int)
internal/store/heap.go:22
MethodAdd
Inserts a vector in the arena and returns its global index
internal/store/arena.go:46
MethodDelete
Delete handles delete requests and flags a vector with tombstone for deletion
internal/http/handler.go:90
MethodDelete
Delete marks a node as deleted using a tombstone. Thne actual node remains intact to preserve structure but is ignored in search results.
internal/store/hnsw.go:280
MethodDelete
(id string)
internal/store/db.go:109
MethodDelete
(id string)
internal/store/shard.go:80
MethodDelete
(id string)
internal/cluster/node.go:132
MethodDelete
(id string)
cmd/benchmark/main.go:59
MethodDelete
(id string)
cmd/server/main.go:50
MethodDelete
(id string)
cmd/node/main.go:53
MethodGet
Retrieves a vector by its global index
internal/store/arena.go:101
MethodInsert
Insert handles insert requests and adds a new vector record to the cluster
internal/http/handler.go:29
MethodInsert
(id string, vector []float32, data any)
internal/store/db.go:54
MethodInsert
(id string, vector []float32, data interface{})
internal/cluster/node.go:96
MethodInsert
(id string, vector []float32, data any)
cmd/benchmark/main.go:37
MethodInsert
(id string, vector []float32, data any)
cmd/server/main.go:28
MethodInsert
(id string, vector []float32, data any)
cmd/node/main.go:31
MethodLeader
()
cmd/server/main.go:59
MethodLeader
()
cmd/node/main.go:62
MethodLen
()
internal/store/heap.go:10
FunctionNewHandler
(cluster *store.Cluster)
internal/http/handler.go:24
MethodPersist
(sink raft.SnapshotSink)
internal/cluster/snapshot.go:20
MethodPush
(m Match)
internal/store/heap.go:12
MethodRelease
()
internal/cluster/snapshot.go:35
MethodReplace
(m Match)
internal/store/heap.go:17
MethodRestore
(rc io.ReadCloser)
internal/cluster/fsm.go:71
MethodSearch
Search handles search requests and returns top K similar vectors from the database
internal/http/handler.go:53
MethodSearch
Search finds and returns the k closest nodes to the query vector using the HNSW algorithm.
internal/store/hnsw.go:171
MethodSearch
(query []float32, topK int)
internal/store/db.go:101
MethodSearch
(query []float32, topK int)
internal/cluster/node.go:128
MethodSearch
(query []float32, topK int)
cmd/benchmark/main.go:46
MethodSearch
(query []float32, topK int)
cmd/server/main.go:37
MethodSearch
(query []float32, topK int)
cmd/node/main.go:40
MethodSnapshot
()
internal/cluster/fsm.go:46
FunctionaddToVector
(a, b []float32)
internal/store/math_utils.go:7
FunctioncosineSimilarity
(a, b []float32)
internal/store/math_utils.go:23
Functiondist
Euclidean Distance (Squared) - Faster than Cosine for HNSW usually TODO: Use SIMD for pure math performance
internal/store/hnsw.go:60
FunctiondivVector
(a []float32, n float32)
internal/store/math_utils.go:13
Functionmain
()
cmd/benchmark/main.go:68
Functionmain
()
cmd/loadtest/main.go:33
Functionmain
()
cmd/server/main.go:68
Functionmain
()
cmd/node/main.go:71