Several TermDict operation now returns an io::Result

This commit is contained in:
Paul Masurel
2020-12-03 12:46:52 +09:00
parent 4b1c770e5e
commit 80a99539ce
14 changed files with 65 additions and 122 deletions

View File

@@ -45,7 +45,7 @@ impl Weight for TermWeight {
} else {
let field = self.term.field();
let inv_index = reader.inverted_index(field)?;
let term_info = inv_index.get_term_info(&self.term);
let term_info = inv_index.get_term_info(&self.term)?;
Ok(term_info.map(|term_info| term_info.doc_freq).unwrap_or(0))
}
}