Class AbstractDocumentCollector<T>

  • Type Parameters:
    T - the generic type of the object accepted by the consumer. This could be a key-value map of the fields or a ScannedDocument instance
    Direct Known Subclasses:
    FieldValuesCollector, ScoredDocumentCollector

    public abstract class AbstractDocumentCollector<T>
    An abstract Collector that exposes a Consumer which in turn accepts an object of a generic type
    • Field Detail

      • requestedFields

        protected final Set<String> requestedFields
    • Constructor Detail

      • AbstractDocumentCollector

        public AbstractDocumentCollector​( indexSearcher,
                                         Set<String> requestedFields,
                                         Consumer<T> consumer)
    • Method Detail

      • setNextReader

        public void setNextReader​(org.apache.lucene.index.AtomicReaderContext readerContext)
        Specified by:
        setNextReader in class
      • acceptsDocsOutOfOrder

        public boolean acceptsDocsOutOfOrder()
        Specified by:
        acceptsDocsOutOfOrder in class
      • collect

        public void collect​(int docID)
                     throws IOException
        Specified by:
        collect in class
      • toConsumable

        public abstract T toConsumable​(org.apache.lucene.document.Document document)
      • getCount

        public long getCount()
      • setIndexSearcher

        public void setIndexSearcher​( indexSearcher)
      • getRequestedFields

        protected Map<String,​String[]> getRequestedFields​(org.apache.lucene.document.Document document)