Module org.apache.lucene.sandbox
Package org.apache.lucene.sandbox.search
Class ProfilerCollectorWrapper
- java.lang.Object
-
- org.apache.lucene.search.FilterCollector
-
- org.apache.lucene.sandbox.search.ProfilerCollectorWrapper
-
- All Implemented Interfaces:
Collector
class ProfilerCollectorWrapper extends FilterCollector
A collector that profiles how much time is spent calling it.
-
-
Field Summary
Fields Modifier and Type Field Description private long
time
-
Fields inherited from class org.apache.lucene.search.FilterCollector
in
-
-
Constructor Summary
Constructors Constructor Description ProfilerCollectorWrapper(Collector in)
Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LeafCollector
getLeafCollector(LeafReaderContext context)
Create a newcollector
to collect the given context.long
getTime()
Return the total time spent on this collector.ScoreMode
scoreMode()
Indicates what features are required from the scorer.-
Methods inherited from class org.apache.lucene.search.FilterCollector
setWeight, toString
-
-
-
-
Constructor Detail
-
ProfilerCollectorWrapper
ProfilerCollectorWrapper(Collector in)
Sole constructor.
-
-
Method Detail
-
scoreMode
public ScoreMode scoreMode()
Description copied from interface:Collector
Indicates what features are required from the scorer.- Specified by:
scoreMode
in interfaceCollector
- Overrides:
scoreMode
in classFilterCollector
-
getLeafCollector
public LeafCollector getLeafCollector(LeafReaderContext context) throws java.io.IOException
Description copied from interface:Collector
Create a newcollector
to collect the given context.- Specified by:
getLeafCollector
in interfaceCollector
- Overrides:
getLeafCollector
in classFilterCollector
- Parameters:
context
- next atomic reader context- Throws:
java.io.IOException
-
getTime
public long getTime()
Return the total time spent on this collector.
-
-