Class InternalProfileCollector

  • All Implemented Interfaces:
    org.apache.lucene.search.Collector

    public class InternalProfileCollector
    extends java.lang.Object
    implements org.apache.lucene.search.Collector
    This class wraps a Lucene Collector and times the execution of: - setScorer() - collect() - doSetNextReader() - needsScores() InternalProfiler facilitates the linking of the Collector graph
    • Method Summary

      Modifier and Type Method Description
      CollectorResult getCollectorTree()  
      org.apache.lucene.search.LeafCollector getLeafCollector​(org.apache.lucene.index.LeafReaderContext context)  
      java.lang.String getName()  
      java.lang.String getReason()  
      long getTime()  
      org.apache.lucene.search.ScoreMode scoreMode()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InternalProfileCollector

        public InternalProfileCollector​(org.apache.lucene.search.Collector collector,
                                        java.lang.String reason,
                                        java.util.List<InternalProfileCollector> children)
    • Method Detail

      • getTime

        public long getTime()
        Returns:
        the profiled time for this collector (inclusive of children)
      • getReason

        public java.lang.String getReason()
        Returns:
        a human readable "hint" about what this collector was used for
      • getName

        public java.lang.String getName()
        Returns:
        the lucene class name of the collector
      • getLeafCollector

        public org.apache.lucene.search.LeafCollector getLeafCollector​(org.apache.lucene.index.LeafReaderContext context)
                                                                throws java.io.IOException
        Specified by:
        getLeafCollector in interface org.apache.lucene.search.Collector
        Throws:
        java.io.IOException
      • scoreMode

        public org.apache.lucene.search.ScoreMode scoreMode()
        Specified by:
        scoreMode in interface org.apache.lucene.search.Collector