refresh
This commit is contained in:
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user