This commit is contained in:
marin postma 2021-06-17 14:38:52 +02:00
parent abdf642d68
commit fa573dabf0
No known key found for this signature in database
GPG key ID: 6088B7721C3E39F9
10 changed files with 19 additions and 18 deletions

View file

@ -20,8 +20,7 @@ pub enum IndexError {
}
internal_error!(
IndexError:
std::io::Error,
IndexError: std::io::Error,
heed::Error,
fst::Error,
serde_json::Error

View file

@ -190,9 +190,7 @@ impl Index {
if fields.iter().all(|f| f != "*") {
facet_distribution.facets(fields);
}
let distribution = facet_distribution
.candidates(candidates)
.execute()?;
let distribution = facet_distribution.candidates(candidates).execute()?;
Some(distribution)
}
@ -532,7 +530,7 @@ fn parse_filter(facets: &Value, index: &Index, txn: &RoTxn) -> Result<Option<Fil
Ok(Some(condition))
}
Value::Array(arr) => parse_filter_array(txn, index, arr),
v => return Err(FacetError::InvalidExpression(&["Array"], v.clone()).into()),
v => Err(FacetError::InvalidExpression(&["Array"], v.clone()).into()),
}
}

View file

@ -219,7 +219,9 @@ impl Index {
let gzipped = false;
let addition = match content {
Some(content) if gzipped => builder.execute(GzDecoder::new(content), indexing_callback)?,
Some(content) if gzipped => {
builder.execute(GzDecoder::new(content), indexing_callback)?
}
Some(content) => builder.execute(content, indexing_callback)?,
None => builder.execute(std::io::empty(), indexing_callback)?,
};
@ -297,7 +299,9 @@ impl Index {
}
}
builder.execute(|indexing_step, update_id| info!("update {}: {:?}", update_id, indexing_step))?;
builder.execute(|indexing_step, update_id| {
info!("update {}: {:?}", update_id, indexing_step)
})?;
Ok(UpdateResult::Other)
}