public class SearchTravTask extends ReadTask
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.
Modifier and Type | Field and Description |
---|---|
protected int |
traversalSize |
Constructor and Description |
---|
SearchTravTask(PerfRunData runData) |
Modifier and Type | Method and Description |
---|---|
QueryMaker |
getQueryMaker()
Return query maker used for this task.
|
void |
setParams(String params)
Set the params of this task.
|
boolean |
supportsParams()
Sub classes that support parameters must override this method to return
true.
|
int |
traversalSize()
Specify the number of hits to traverse.
|
boolean |
withRetrieve()
Return true if, with search & results traversing, docs should be retrieved.
|
boolean |
withSearch()
Return true if search should be performed.
|
boolean |
withTraverse()
Return true if, with search, results should be traversed.
|
boolean |
withWarm()
Return true if warming should be performed.
|
createCollector, doLogic, getBenchmarkHighlighter, getFieldsToHighlight, getSort, numHits, numToHighlight, retrieveDoc, setup, withCollector, withMaxScore, withScore
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
public SearchTravTask(PerfRunData runData)
public boolean withRetrieve()
ReadTask
withRetrieve
in class ReadTask
public boolean withSearch()
ReadTask
withSearch
in class ReadTask
public boolean withTraverse()
ReadTask
withTraverse
in class ReadTask
public boolean withWarm()
ReadTask
public QueryMaker getQueryMaker()
ReadTask
getQueryMaker
in class ReadTask
public int traversalSize()
ReadTask
ReadTask.withTraverse()
is true. Must be greater than 0.
Read task calculates the traversal as: Math.min(hits.length(), traversalSize())traversalSize
in class ReadTask
public void setParams(String params)
PerfTask
public boolean supportsParams()
PerfTask
supportsParams
in class PerfTask