Documentation ¶
Overview ¶
Package wal provides a simple interface for Write-Ahead Logging (WAL) of operations on HNSW indices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeletionMark ¶
type DeletionMark struct {
ID uint32
}
DeletionMark is a log entry representing the operation of marking data for deletion.
type EfSetting ¶
type EfSetting struct {
Ef int
}
EfSetting is a log entry representing the operation of setting the "ef" parameter.
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
Log is an object to conveniently handle write-ahead log files for HNSW indices.
func (*Log) Read ¶
Read reads all entries from the log file and calls the given function for each of them.
If the log file does not exists, no error is returned, since this scenario is considered an equivalent of having an empty log.
If the log file was still open for writing, it is first closed.
The callback function can return an error; if it is not nil, the entries iteration will stop, and the Read function will returned the same error.
func (*Log) WriteDeletionMark ¶
WriteDeletionMark appends a new DeletionMark entry to the log.
func (*Log) WriteEfSetting ¶
WriteEfSetting appends a new EfSetting entry to the log.
type PointAddition ¶
PointAddition is a log entry representing the operation of adding new data.