refresh
Some checks failed
CI / Typos (push) Failing after 16s
CI / Clippy (push) Failing after 1m7s
CI / Build and test (push) Successful in 1m14s

This commit is contained in:
2026-02-22 09:38:41 -08:00
parent cafdeeadc1
commit 16cc0566b6

View File

@@ -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| {