///|
type DocId = @core.DocId
///|
type Term = @core.Term
///|
type PersistenceError = @core.PersistenceError
///|
type Schema = @schema.Schema
///|
type Segment = @index.Segment
///|
type SnapshotSegment = @index.SnapshotSegment
///|
type Searcher = @query.Searcher
///|
type SegmentDecoder = @codec.SegmentDecoder
///|
let segment_header_length : Int = @codec.segment_header_length
///|
fn segment_checksum(bytes : Bytes) -> UInt {
@codec.segment_checksum(bytes)
}
///|
fn write_string(buffer : @buffer.Buffer, value : String) -> Unit {
@codec.write_string(buffer, value)
}
///|
fn schemas_equal(left : Schema?, right : Schema?) -> Bool {
@schema.schemas_equal(left, right)
}
///|
fn encode_segment(segment : Segment) -> Bytes {
@index.encode_segment(segment)
}
///|
fn decode_segment(bytes : Bytes) -> Segment raise PersistenceError {
@index.decode_segment(bytes)
}
///|
fn merge_snapshot_segments(
snapshots : ReadOnlyArray[SnapshotSegment],
) -> Segment {
@index.merge_snapshot_segments(snapshots)
}