README

Lucius646/MoonSearch/store does not have a README file

#
Directory

pub(open) trait Directory {
fn write(Self, String, Bytes) -> Unit raise
PersistenceError

fn read(Self, String) -> Bytes raise
PersistenceError

fn exists(Self, String) -> Bool
}

Minimal byte-oriented storage boundary for immutable index files.

#
FsDirectory

pub struct FsDirectory {
root : String
}

Filesystem-backed Directory rooted at one directory.

#
IndexReader

pub struct IndexReader[D] {
directory : D
segments : ReadOnlyArray[
SnapshotSegment
]
schema_snapshot :
Schema
?
generation_snapshot : Int
closed : Bool
}

Immutable snapshot of the Segment set named by one manifest generation.

#
IndexReader::close

fn[D] IndexReader::close(self : IndexReader[D]) -> Unit

#
IndexReader::generation

#
IndexReader::segment_count

#
IndexWriter

pub struct IndexWriter[D] {
directory : D
pending_delete_terms : Array[
Term
]
closed : Bool
}

Incremental writer that publishes one new immutable Segment per commit.

#
IndexWriter::close

fn[D] IndexWriter::close(self : IndexWriter[D]) -> Unit

#
IndexWriter::commit

Writes the new Segment first and publishes it by replacing the manifest last. Readers that already opened a manifest keep their previous snapshot.

#
IndexWriter::commit_deletes

Applies queued Term deletions to currently published Segments and publishes a new manifest generation. With no queued terms this is a no-op.

#
IndexWriter::delete_term

Queues an exact field-qualified Term deletion for the next writer commit.

#
IndexWriter::merge

Merges every live document into one new immutable Segment and publishes it as a new generation. Existing files remain available to older Readers.

#
IndexWriter::new

fn[D] IndexWriter::new(directory : D) -> IndexWriter[D]

#
MemoryDirectory

pub struct MemoryDirectory {
names : Array[String]
contents : Array[Bytes]
}

In-memory Directory implementation. Reads and writes copy bytes so a caller cannot mutate an already committed snapshot through an alias.

#
MemoryDirectory::new

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io