/** * Add the terms in a DocumentPostingList to the postings in memory. * @param docPostings DocumentPostingList containing the term information for the denoted document. * @param docid Current document Identifier. * @throws IOException if an I/O error occurs. */ public void addTerms(DocumentPostingList docPostings, int docid) throws IOException { for (String term : docPostings.termSet()) add(term, docid, docPostings.getFrequency(term)); }