/** * Hook method that creates the right type of DocumentTree class. */ protected void createDocumentPostings(){ if (FieldScore.FIELDS_COUNT > 0) termsInDocument = new FieldDocumentPostingList(FieldScore.FIELDS_COUNT); else termsInDocument = new DocumentPostingList(); }
/** FIXME */ void createDocumentPostings() { if (numFields>0) termsInDocument = new FieldDocumentPostingList(numFields); else termsInDocument = new DocumentPostingList(); }
/** {@inheritDoc} */ @Override public void indexDocument(Document doc) throws Exception { if (doc == null) return; // Process terms through term pipeline. fdpl = new FieldDocumentPostingList(fieldtags.length); while (!doc.endOfDocument()) { String term = doc.getNextTerm(); if (term == null || term.equals("")) continue; docFields = doc.getFields(); pipeline.processTerm(term); } indexDocument(doc.getAllProperties(), fdpl); }