/** * Adds the feedback document from the index given a docid */ public void insertDocument(int docid, int rank, double score) throws IOException { totalDocumentLength += documentIndex.getDocumentLength(docid); final IterablePosting ip = directIndex.getPostings((BitIndexPointer)documentIndex.getDocumentEntry(docid)); if (ip == null) { logger.warn("document id "+docid+" not found"); return; } while(ip.next() != IterablePosting.EOL) { this.insertTerm(ip.getId(), ip.getFrequency()); } feedbackDocumentCount++; }
/** * Adds the feedback document from the index given a docid */ public void insertDocument(int docid, int rank, double score) throws IOException { totalDocumentLength += documentIndex.getDocumentLength(docid); final IterablePosting ip = directIndex.getPostings((BitIndexPointer)documentIndex.getDocumentEntry(docid)); if (ip == null) { logger.warn("document id "+docid+" not found"); return; } while(ip.next() != IterablePosting.EOL) { this.insertTerm(ip.getId(), ip.getFrequency()); } feedbackDocumentCount++; }