Skip to main content

preflight_index

Function preflight_index 

Source
pub fn preflight_index(
    config: &TextPluginConfig,
    data_dir: &Path,
) -> Result<(), DevError>
Expand description

Fail fast when an existing text index cannot be adopted by this build.

The index is derived data, but this build never rebuilds it automatically: its documents precede every axis write, so a schema/fingerprint mismatch would not surface as a query error — it would fail every insert at the partition, long after startup looked healthy. The check is read-only and lock-free (it reads the Tantivy meta and the sidecar), so it runs before the cluster or an import opens the store. A store with no index is left to the normal build path; a --with-text-disabled process is not checked.