@Override public void setBitIndexPointer(BitIndexPointer pointer) { innerDocumentIndexEntry.setBitIndexPointer(pointer); }
/** * This adds a document to the direct and document indexes, as well * as it's terms to the lexicon. Handled internally by the methods * indexFieldDocument and indexNoFieldDocument. * @param docProperties Map<String,String> properties of the document * @param _termsInDocument DocumentPostingList the terms in the document. * */ protected void indexDocument(Map<String,String> docProperties, DocumentPostingList _termsInDocument) throws Exception { /* add words to lexicontree */ lexiconBuilder.addDocumentTerms(_termsInDocument); /* add doc postings to the direct index */ BitIndexPointer dirIndexPost = directIndexBuilder.writePostings(_termsInDocument.getPostings2(termCodes)); /* add doc to documentindex */ DocumentIndexEntry die = _termsInDocument.getDocumentStatistics(); die.setBitIndexPointer(dirIndexPost); docIndexBuilder.addEntryToBuffer(die); /** add doc metadata to index */ metaBuilder.writeDocumentEntry(docProperties); }
/** * This adds a document to the direct and document indexes, as well * as it's terms to the lexicon. Handled internally by the methods * indexFieldDocument and indexNoFieldDocument. * @param docProperties Map<String,String> properties of the document * @param _termsInDocument DocumentPostingList the terms in the document. * */ protected void indexDocument(Map<String,String> docProperties, DocumentPostingList _termsInDocument) throws Exception { /* add words to lexicontree */ lexiconBuilder.addDocumentTerms(_termsInDocument); /* add doc postings to the direct index */ BitIndexPointer dirIndexPost = directIndexBuilder.writePostings(_termsInDocument.getPostings2(termCodes)); //.addDocument(termsInDocument.getPostings()); /* add doc to documentindex */ DocumentIndexEntry die = _termsInDocument.getDocumentStatistics(); die.setBitIndexPointer(dirIndexPost); docIndexBuilder.addEntryToBuffer(die); /** add doc metadata to index */ metaBuilder.writeDocumentEntry(docProperties); }
die.setBitIndexPointer(pointerDF); docidOutput.addEntryToBuffer(die); metaBuilder.writeDocumentEntry(metaInput1.getAllItems(sourceDocid)); pointerDF = dfOutput.writePostings(postingList.iterator()); die.setBitIndexPointer(pointerDF); docidOutput.addEntryToBuffer(die); metaBuilder.writeDocumentEntry(metaInput2.getAllItems(sourceDocid));