Class CeCollector<T extends org.apache.lucene.search.ScoreDoc>

  • Type Parameters:
    T - Type of Object to rank against each others.
    All Implemented Interfaces:
    org.apache.lucene.search.Collector
    Direct Known Subclasses:
    CeTopScoreDocCollector

    public abstract class CeCollector<T extends org.apache.lucene.search.ScoreDoc>
    extends java.lang.Object
    implements org.apache.lucene.search.Collector
    Cerebro's internal Scoring functionality.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Container<T> arr  
      protected static org.apache.lucene.search.TopDocs EMPTY_TOPDOCS  
      protected int topK  
      protected int totalHits  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CeCollector​(Container<T> container, int k)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      int getTotalHits()  
      protected abstract org.apache.lucene.search.TopDocs newTopDocs​(org.apache.lucene.search.ScoreDoc[] results, int start)  
      protected void populateResults​(org.apache.lucene.search.ScoreDoc[] results, int howMany)  
      org.apache.lucene.search.TopDocs topDocs()  
      org.apache.lucene.search.TopDocs topDocs​(int start)  
      org.apache.lucene.search.TopDocs topDocs​(int start, int howMany)  
      protected int topDocsSize()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.lucene.search.Collector

        getLeafCollector, needsScores
    • Field Detail

      • EMPTY_TOPDOCS

        protected static final org.apache.lucene.search.TopDocs EMPTY_TOPDOCS
      • topK

        protected final int topK
      • arr

        protected Container<T extends org.apache.lucene.search.ScoreDoc> arr
      • totalHits

        protected int totalHits
    • Constructor Detail

      • CeCollector

        protected CeCollector​(Container<T> container,
                              int k)
    • Method Detail

      • populateResults

        protected void populateResults​(org.apache.lucene.search.ScoreDoc[] results,
                                       int howMany)
      • newTopDocs

        protected abstract org.apache.lucene.search.TopDocs newTopDocs​(org.apache.lucene.search.ScoreDoc[] results,
                                                                       int start)
      • getTotalHits

        public int getTotalHits()
      • topDocsSize

        protected int topDocsSize()
      • topDocs

        public org.apache.lucene.search.TopDocs topDocs()
      • topDocs

        public org.apache.lucene.search.TopDocs topDocs​(int start)
      • topDocs

        public org.apache.lucene.search.TopDocs topDocs​(int start,
                                                        int howMany)