Class SearchTravTask
java.lang.Object
org.apache.lucene.benchmark.byTask.tasks.PerfTask
org.apache.lucene.benchmark.byTask.tasks.ReadTask
org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
SearchTravRetHighlightTask,SearchTravRetLoadFieldSelectorTask,SearchTravRetTask
Search and Traverse task.
Note: This task reuses the reader if it is already open. Otherwise a reader is opened at start and closed at the end.
Takes optional param: traversal size (otherwise all results are traversed).
Other side effects: counts additional 1 (record) for each traversed hit.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn query maker used for this task.voidSet the params of this task.booleanSub classes that support parameters must override this method to return true.intSpecify the number of hits to traverse.booleanReturn true if, with search and results traversing, docs should be retrieved.booleanReturn true if search should be performed.booleanReturn true if, with search, results should be traversed.booleanwithWarm()Return true if warming should be performed.Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask
createCollectorManager, doLogic, getSort, numHits, retrieveDoc, setup, withCollector, withTopDocs, withTotalHitsMethods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getAlgLineNum, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setAlgLineNum, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
-
Field Details
-
traversalSize
protected int traversalSize
-
-
Constructor Details
-
SearchTravTask
-
-
Method Details
-
withRetrieve
public boolean withRetrieve()Description copied from class:ReadTaskReturn true if, with search and results traversing, docs should be retrieved.- Specified by:
withRetrievein classReadTask
-
withSearch
public boolean withSearch()Description copied from class:ReadTaskReturn true if search should be performed.- Specified by:
withSearchin classReadTask
-
withTraverse
public boolean withTraverse()Description copied from class:ReadTaskReturn true if, with search, results should be traversed.- Specified by:
withTraversein classReadTask
-
withWarm
public boolean withWarm()Description copied from class:ReadTaskReturn true if warming should be performed. -
getQueryMaker
Description copied from class:ReadTaskReturn query maker used for this task.- Specified by:
getQueryMakerin classReadTask
-
traversalSize
public int traversalSize()Description copied from class:ReadTaskSpecify the number of hits to traverse. Tasks should override this if they want to restrict the number of hits that are traversed whenReadTask.withTraverse()is true. Must be greater than 0.Read task calculates the traversal as: Math.min(hits.length(), traversalSize())
- Overrides:
traversalSizein classReadTask- Returns:
- Integer.MAX_VALUE
-
setParams
Description copied from class:PerfTaskSet the params of this task. -
supportsParams
public boolean supportsParams()Description copied from class:PerfTaskSub classes that support parameters must override this method to return true.- Overrides:
supportsParamsin classPerfTask- Returns:
- true iff this task supports command line params.
-