pub fn check_fts_functional(conn: &Connection) -> Result<bool, AppError>Expand description
Public helper: returns true when the FTS5 module is loadable AND the
fts_memories virtual table exists AND a wildcard MATCH query succeeds.
Used by crate::commands::optimize to skip the (potentially minute-long)
FTS5 rebuild when the index is already healthy. Also used by health and
by future vec check implementations.
ยงErrors
Returns Err(AppError::Database) only when the connection cannot be opened
for reasons unrelated to FTS5 itself (permission denied, corrupted file).
A missing FTS5 module or table is reported as Ok(false).