Class SearchTravRetLoadFieldSelectorTask
- java.lang.Object
-
- org.apache.lucene.benchmark.byTask.tasks.PerfTask
-
- org.apache.lucene.benchmark.byTask.tasks.ReadTask
-
- org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
-
- org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask
-
- All Implemented Interfaces:
Cloneable
public class SearchTravRetLoadFieldSelectorTask extends SearchTravTask
Search and Traverse and Retrieve docs task using a SetBasedFieldSelector.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: comma separated list of Fields to load.
Other side effects: counts additional 1 (record) for each traversed hit, and 1 more for each retrieved (non null) document.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.lucene.document.FieldSelectorfieldSelector-
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
traversalSize
-
-
Constructor Summary
Constructors Constructor Description SearchTravRetLoadFieldSelectorTask(PerfRunData runData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.lucene.document.DocumentretrieveDoc(org.apache.lucene.index.IndexReader ir, int id)voidsetParams(String params)Set the params of this task.booleansupportsParams()Sub classes that support parameters must override this method to return true.booleanwithRetrieve()Return true if, with search & results traversing, docs should be retrieved.-
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
getQueryMaker, traversalSize, withSearch, withTraverse, withWarm
-
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask
createCollector, doLogic, getBenchmarkHighlighter, getFieldsToHighlight, getSort, numHits, numToHighlight, setup, withCollector, withMaxScore, withScore
-
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
-
-
-
-
Constructor Detail
-
SearchTravRetLoadFieldSelectorTask
public SearchTravRetLoadFieldSelectorTask(PerfRunData runData)
-
-
Method Detail
-
withRetrieve
public boolean withRetrieve()
Description copied from class:ReadTaskReturn true if, with search & results traversing, docs should be retrieved.- Overrides:
withRetrievein classSearchTravTask
-
retrieveDoc
protected org.apache.lucene.document.Document retrieveDoc(org.apache.lucene.index.IndexReader ir, int id) throws IOException- Overrides:
retrieveDocin classReadTask- Throws:
IOException
-
setParams
public void setParams(String params)
Description copied from class:PerfTaskSet the params of this task.- Overrides:
setParamsin classSearchTravTask
-
supportsParams
public boolean supportsParams()
Description copied from class:PerfTaskSub classes that support parameters must override this method to return true.- Overrides:
supportsParamsin classSearchTravTask- Returns:
- true iff this task supports command line params.
-
-