|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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.SearchTravRetHighlightTask
public class SearchTravRetHighlightTask
Search and Traverse and Retrieve docs task. Highlight the fields in the retrieved documents.
Uses the SimpleHTMLFormatter for formatting.
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 multivalued, comma separated param string as: size[<traversal size>],highlight[<int>],maxFrags[<int>],mergeContiguous[<boolean>],fields[name1;name2;...]
"SearchHlgtSameRdr" SearchTravRetHighlight(size[10],highlight[10],mergeContiguous[true],maxFrags[3],fields[body]) > : 1000Documents must be stored in order for this task to work. Additionally, term vector positions can be used as well.
Other side effects: counts additional 1 (record) for each traversed hit, and 1 more for each retrieved (non null) document and 1 for each fragment returned.
| Field Summary | |
|---|---|
protected int |
maxFrags
|
protected boolean |
mergeContiguous
|
protected int |
numToHighlight
|
protected Set |
paramFields
|
| Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask |
|---|
traversalSize |
| Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask |
|---|
NEW_LINE, params |
| Constructor Summary | |
|---|---|
SearchTravRetHighlightTask(PerfRunData runData)
|
|
| Method Summary | |
|---|---|
protected Collection |
getFieldsToHighlight(Document document)
Define the fields to highlight. |
boolean |
isMergeContiguousFragments()
|
int |
maxNumFragments()
|
int |
numToHighlight()
Set to the number of documents to highlight. |
void |
setParams(String params)
Set the params of this task. |
void |
setup()
Task setup work that should not be measured for that specific task. |
boolean |
withRetrieve()
Return true if, with search & results traversing, docs should be retrieved. |
| Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask |
|---|
getQueryMaker, supportsParams, traversalSize, withSearch, withTraverse, withWarm |
| Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask |
|---|
doHighlight, doLogic, getHighlighter, getSort, retrieveDoc |
| Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask |
|---|
clone, getDepth, getName, getParams, getRunData, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, shouldNeverLogAtStart, shouldNotRecordStats, tearDown, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int numToHighlight
protected boolean mergeContiguous
protected int maxFrags
protected Set paramFields
| Constructor Detail |
|---|
public SearchTravRetHighlightTask(PerfRunData runData)
| Method Detail |
|---|
public void setup()
throws Exception
PerfTask
setup in class PerfTaskExceptionpublic boolean withRetrieve()
ReadTask
withRetrieve in class SearchTravTaskpublic int numToHighlight()
ReadTask
numToHighlight in class ReadTaskpublic boolean isMergeContiguousFragments()
isMergeContiguousFragments in class ReadTaskpublic int maxNumFragments()
maxNumFragments in class ReadTaskprotected Collection getFieldsToHighlight(Document document)
ReadTask
getFieldsToHighlight in class ReadTaskdocument - The Document
public void setParams(String params)
PerfTask
setParams in class SearchTravTask
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||