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, withScoreclone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toStringpublic SearchTravTask(PerfRunData runData)
public boolean withRetrieve()
ReadTaskwithRetrieve in class ReadTaskpublic boolean withSearch()
ReadTaskwithSearch in class ReadTaskpublic boolean withTraverse()
ReadTaskwithTraverse in class ReadTaskpublic boolean withWarm()
ReadTaskpublic QueryMaker getQueryMaker()
ReadTaskgetQueryMaker in class ReadTaskpublic int traversalSize()
ReadTaskReadTask.withTraverse() is true. Must be greater than 0.
Read task calculates the traversal as: Math.min(hits.length(), traversalSize())traversalSize in class ReadTaskpublic void setParams(String params)
PerfTaskpublic boolean supportsParams()
PerfTasksupportsParams in class PerfTask