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§
- Text
Index Meta - 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 (seeTextIndex::wipe). Byte-level here on purpose: the sketch type lives inwaratah_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.