Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Rupamthxt/VectraDB
/ functions
Functions
76 in github.com/Rupamthxt/VectraDB
⨍
Functions
76
◇
Types & classes
31
↓ 9 callers
Method
Search
(query []float32, topK int)
internal/store/shard.go:11
↓ 8 callers
Method
Add
Add's a new node to the HNSW graph, connecting it to existing nodes based on proximity
internal/store/hnsw.go:108
↓ 7 callers
Method
Delete
(id string)
internal/store/shard.go:12
↓ 7 callers
Method
Get
(id string)
internal/store/db.go:83
↓ 6 callers
Method
Insert
(id string, vector []float32, data interface{})
internal/store/shard.go:10
↓ 5 callers
Method
Close
Close closes the underlying file of the DiskStore
internal/store/disk.go:82
↓ 5 callers
Function
Quantize
Quantize compresses a float32 vector into an int8 vector
internal/store/quantize.go:12
↓ 4 callers
Function
DistQuantized
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 callers
Function
NewRaftNode
(shardID int, nodeID string, baseDir string, raftPort int, db *store.VectraDB)
internal/cluster/node.go:28
↓ 4 callers
Function
NewVectraDB
(dim int, storagePath string)
internal/store/db.go:33
↓ 3 callers
Method
Dequantize
Dequantize unpacks int8 vector back to float32 for precise math
internal/store/quantize.go:45
↓ 3 callers
Method
Join
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 callers
Function
NewCluster
(shards []ShardHandler)
internal/store/shard.go:20
↓ 3 callers
Method
searchLayer
searchLayer finds the closest node to query in a specific layer starting from entry point
internal/store/hnsw.go:71
↓ 2 callers
Method
Apply
Apply applies a Raft Log Entry to the FSM.
internal/cluster/fsm.go:29
↓ 2 callers
Method
GetShard
(id string)
internal/store/shard.go:27
↓ 2 callers
Method
Write
Write appends data to the disk and returns its FileLocation
internal/store/disk.go:50
↓ 2 callers
Function
randomVector
(dim int)
cmd/benchmark/main.go:237
↓ 2 callers
Function
randomVector
(dim int)
cmd/loadtest/main.go:116
↓ 2 callers
Function
runTest
Generic Test Runner to handle Concurrency and Timing
cmd/loadtest/main.go:62
↓ 2 callers
Function
sendRequest
Helper to send HTTP requests
cmd/loadtest/main.go:91
↓ 1 callers
Method
GetShardByID
(n int)
internal/store/shard.go:37
↓ 1 callers
Method
Insert
(id string, vector []float32, data any)
internal/store/shard.go:44
↓ 1 callers
Method
InsertInMemory
(id string, vector []float32)
internal/store/db.go:113
↓ 1 callers
Method
Leader
()
internal/http/handler.go:21
↓ 1 callers
Function
NewDiskStore
NewDiskStore initializes a new DiskStore at the given path.
internal/store/disk.go:26
↓ 1 callers
Function
NewFSM
(db *store.VectraDB)
internal/cluster/fsm.go:24
↓ 1 callers
Function
NewHNSWIndex
Return a new HNSW Index Tree
internal/store/hnsw.go:40
↓ 1 callers
Function
NewVectorArena
Initializes arena with a pre allocated capacity
internal/store/arena.go:26
↓ 1 callers
Method
Read
Read retrieves data from the disk based on the provided FileLocation
internal/store/disk.go:68
↓ 1 callers
Method
Search
(query []float32, topK int)
internal/store/shard.go:49
↓ 1 callers
Method
Size
Returns the total number of vectors stored
internal/store/arena.go:150
↓ 1 callers
Method
down
(i0, n int)
internal/store/heap.go:33
↓ 1 callers
Method
randomLevel
randomLevel generates a level for a new node (Geometric Distribution)
internal/store/hnsw.go:50
↓ 1 callers
Method
up
(j int)
internal/store/heap.go:22
Method
Add
Inserts a vector in the arena and returns its global index
internal/store/arena.go:46
Method
Delete
Delete handles delete requests and flags a vector with tombstone for deletion
internal/http/handler.go:90
Method
Delete
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
Method
Delete
(id string)
internal/store/db.go:109
Method
Delete
(id string)
internal/store/shard.go:80
Method
Delete
(id string)
internal/cluster/node.go:132
Method
Delete
(id string)
cmd/benchmark/main.go:59
Method
Delete
(id string)
cmd/server/main.go:50
Method
Delete
(id string)
cmd/node/main.go:53
Method
Get
Retrieves a vector by its global index
internal/store/arena.go:101
Method
Insert
Insert handles insert requests and adds a new vector record to the cluster
internal/http/handler.go:29
Method
Insert
(id string, vector []float32, data any)
internal/store/db.go:54
Method
Insert
(id string, vector []float32, data interface{})
internal/cluster/node.go:96
Method
Insert
(id string, vector []float32, data any)
cmd/benchmark/main.go:37
Method
Insert
(id string, vector []float32, data any)
cmd/server/main.go:28
Method
Insert
(id string, vector []float32, data any)
cmd/node/main.go:31
Method
Leader
()
cmd/server/main.go:59
Method
Leader
()
cmd/node/main.go:62
Method
Len
()
internal/store/heap.go:10
Function
NewHandler
(cluster *store.Cluster)
internal/http/handler.go:24
Method
Persist
(sink raft.SnapshotSink)
internal/cluster/snapshot.go:20
Method
Push
(m Match)
internal/store/heap.go:12
Method
Release
()
internal/cluster/snapshot.go:35
Method
Replace
(m Match)
internal/store/heap.go:17
Method
Restore
(rc io.ReadCloser)
internal/cluster/fsm.go:71
Method
Search
Search handles search requests and returns top K similar vectors from the database
internal/http/handler.go:53
Method
Search
Search finds and returns the k closest nodes to the query vector using the HNSW algorithm.
internal/store/hnsw.go:171
Method
Search
(query []float32, topK int)
internal/store/db.go:101
Method
Search
(query []float32, topK int)
internal/cluster/node.go:128
Method
Search
(query []float32, topK int)
cmd/benchmark/main.go:46
Method
Search
(query []float32, topK int)
cmd/server/main.go:37
Method
Search
(query []float32, topK int)
cmd/node/main.go:40
Method
Snapshot
()
internal/cluster/fsm.go:46
Function
addToVector
(a, b []float32)
internal/store/math_utils.go:7
Function
cosineSimilarity
(a, b []float32)
internal/store/math_utils.go:23
Function
dist
Euclidean Distance (Squared) - Faster than Cosine for HNSW usually TODO: Use SIMD for pure math performance
internal/store/hnsw.go:60
Function
divVector
(a []float32, n float32)
internal/store/math_utils.go:13
Function
main
()
cmd/benchmark/main.go:68
Function
main
()
cmd/loadtest/main.go:33
Function
main
()
cmd/server/main.go:68
Function
main
()
cmd/node/main.go:71