Introduce the reindex_all_documents indexing function

This commit is contained in:
Clément Renault 2019-10-21 17:33:52 +02:00
parent e86a547e93
commit 0f30a221fa
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
9 changed files with 259 additions and 130 deletions

View file

@ -121,7 +121,7 @@ pub struct AllDocumentsFieldsCountsIter<'txn> {
iter: heed::RoIter<'txn, OwnedType<DocumentAttrKey>, OwnedType<u64>>,
}
impl<'r> Iterator for AllDocumentsFieldsCountsIter<'r> {
impl Iterator for AllDocumentsFieldsCountsIter<'_> {
type Item = ZResult<(DocumentId, SchemaAttr, u64)>;
fn next(&mut self) -> Option<Self::Item> {

View file

@ -23,6 +23,10 @@ impl PostingsLists {
self.postings_lists.delete(writer, word)
}
pub fn clear(self, writer: &mut heed::RwTxn) -> ZResult<()> {
self.postings_lists.clear(writer)
}
pub fn postings_list<'txn>(
self,
reader: &'txn heed::RoTxn,