Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmacavaney committed Sep 17, 2024
1 parent ceea6f6 commit 94c35d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index/inverted_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ impl IndexBuilder {
}

pub fn push_posting(&mut self, term_id: u32, doc_id: u32, tf: u32) {
// Pushes the doc_id and tf to the posting assocaited with term_id. This function assumes doc_ids are added in an increasing order.
self.posting_lists[term_id as usize].push((doc_id, tf));
}

Expand Down

0 comments on commit 94c35d4

Please sign in to comment.