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
Search and Traverse and Retrieve docs task using a FieldVisitor loading only the requested
fields.
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 inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
traversalSize
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Document
retrieveDoc
(IndexReader ir, int id) void
Set the params of this task.boolean
Sub classes that support parameters must override this method to return true.boolean
Return true if, with search and 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, getSort, numHits, setup, withCollector, withTopDocs, withTotalHits
Methods 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
-
fieldsToLoad
-
-
Constructor Details
-
SearchTravRetLoadFieldSelectorTask
-
-
Method Details
-
withRetrieve
public boolean withRetrieve()Description copied from class:ReadTask
Return true if, with search and results traversing, docs should be retrieved.- Overrides:
withRetrieve
in classSearchTravTask
-
retrieveDoc
- Overrides:
retrieveDoc
in classReadTask
- Throws:
IOException
-
setParams
Description copied from class:PerfTask
Set the params of this task.- Overrides:
setParams
in classSearchTravTask
-
supportsParams
public boolean supportsParams()Description copied from class:PerfTask
Sub classes that support parameters must override this method to return true.- Overrides:
supportsParams
in classSearchTravTask
- Returns:
- true iff this task supports command line params.
-