diff --git a/crates/pile/src/command/lookup.rs b/crates/pile/src/command/lookup.rs index 3da81db..ec48824 100644 --- a/crates/pile/src/command/lookup.rs +++ b/crates/pile/src/command/lookup.rs @@ -23,9 +23,9 @@ pub struct LookupCommand { #[arg(long, short = 'c', default_value = "./pile.toml")] config: PathBuf, - /// If provided, do not refresh fts + /// If provided, refresh fts if it is out-of-date #[arg(long)] - no_refresh: bool, + refresh: bool, /// Number of threads to use for indexing #[arg(long, short = 'j', default_value = "3")] @@ -42,7 +42,7 @@ impl CliCmd for LookupCommand { let ds = Dataset::open(&self.config) .with_context(|| format!("while opening dataset for {}", self.config.display()))?; - if !self.no_refresh { + if self.refresh { if ds.needs_fts().context("while checking dataset fts")? { info!("FTS index is missing or out-of-date, regenerating"); ds.fts_refresh(self.jobs, Some(flag)).map_err(|x| {