Skip to main content

Module meta

Module meta 

Source
Expand description

Index sidecar metadata: the trust state and the configuration that lives beside the Tantivy directory.

{index_dir}/waratah-text.json carries the analyzer, the seed length, the config fingerprint and the build epoch. It is written when the index is created (with no epoch), stamped by the rebuild’s finish step, and cleared to “no epoch” by a wipe — so a wiped index reads as untrusted while its configuration survives. Deleting the directory removes everything.

Structs§

TextIndexMeta
Persisted index metadata.

Constants§

META_FILE
Sidecar file name inside the index directory.
META_VERSION
Version of the sidecar layout.
SKETCH_FILE
Seed-sketch sidecar file name (a sibling of META_FILE); written at rebuild finish and removed by every wipe path (see TextIndex::wipe). Byte-level here on purpose: the sketch type lives in waratah_stats, which this crate does not depend on — callers encode/decode.

Functions§

read_meta
Read the sidecar, Ok(None) when the index has never been configured.
remove_meta
Delete the sidecar. Missing is success.
write_meta
Write the sidecar atomically: temp file, fsync, rename, fsync the directory.