Class SearchTravRetVectorHighlightTask
Search and Traverse and Retrieve docs task. Highlight the fields in the retrieved documents by using Lucene.Net.Search.VectorHighlight.FastVectorHighlighter.
Implements
Inherited Members
Namespace: Lucene.Net.Benchmarks.ByTask.Tasks
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class SearchTravRetVectorHighlightTask : SearchTravTask, IDisposable
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
Constructors
SearchTravRetVectorHighlightTask(PerfRunData)
Search and Traverse and Retrieve docs task. Highlight the fields in the retrieved documents by using Lucene.Net.Search.VectorHighlight.FastVectorHighlighter.
Declaration
public SearchTravRetVectorHighlightTask(PerfRunData runData)
Parameters
Type | Name | Description |
---|---|---|
PerfRunData | runData |
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
Fields
m_fragSize
Search and Traverse and Retrieve docs task. Highlight the fields in the retrieved documents by using Lucene.Net.Search.VectorHighlight.FastVectorHighlighter.
Declaration
protected int m_fragSize
Field Value
Type | Description |
---|---|
int |
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
m_highlighter
Search and Traverse and Retrieve docs task. Highlight the fields in the retrieved documents by using Lucene.Net.Search.VectorHighlight.FastVectorHighlighter.
Declaration
protected FastVectorHighlighter m_highlighter
Field Value
Type | Description |
---|---|
FastVectorHighlighter |
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
m_maxFrags
Search and Traverse and Retrieve docs task. Highlight the fields in the retrieved documents by using Lucene.Net.Search.VectorHighlight.FastVectorHighlighter.
Declaration
protected int m_maxFrags
Field Value
Type | Description |
---|---|
int |
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
m_numToHighlight
Search and Traverse and Retrieve docs task. Highlight the fields in the retrieved documents by using Lucene.Net.Search.VectorHighlight.FastVectorHighlighter.
Declaration
protected int m_numToHighlight
Field Value
Type | Description |
---|---|
int |
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
m_paramFields
Search and Traverse and Retrieve docs task. Highlight the fields in the retrieved documents by using Lucene.Net.Search.VectorHighlight.FastVectorHighlighter.
Declaration
protected ISet<string> m_paramFields
Field Value
Type | Description |
---|---|
ISet<string> |
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
Properties
NumToHighlight
The number of documents to highlight. 0 means no docs will be highlighted.
Declaration
public override int NumToHighlight { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
WithRetrieve
Return true
if, with search & results traversing, docs should be retrieved.
Declaration
public override bool WithRetrieve { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
Methods
GetBenchmarkHighlighter(Query)
Return an appropriate highlighter to be used with highlighting tasks.
Declaration
protected override BenchmarkHighlighter GetBenchmarkHighlighter(Query q)
Parameters
Type | Name | Description |
---|---|---|
Query | q |
Returns
Type | Description |
---|---|
BenchmarkHighlighter |
Overrides
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
GetFieldsToHighlight(Document)
Define the fields to highlight. Base implementation returns all fields.
Declaration
protected override ICollection<string> GetFieldsToHighlight(Document document)
Parameters
Type | Name | Description |
---|---|---|
Document | document | The Lucene.Net.Documents.Document. |
Returns
Type | Description |
---|---|
ICollection<string> | An ICollection{string} of Lucene.Net.Documents.Field names. |
Overrides
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
SetParams(string)
Set the params of this task.
Declaration
public override void SetParams(string @params)
Parameters
Type | Name | Description |
---|---|---|
string | params |
Overrides
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.
Exceptions
Type | Condition |
---|---|
NotSupportedException | For tasks supporting command line parameters. |
Setup()
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from DoLogic() to this method. Only the work done in DoLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.
Declaration
public override void Setup()
Overrides
Remarks
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;...]
- traversal sizeThe number of hits to traverse, otherwise all will be traversed.
- highlightThe number of the hits to highlight. Will always be less than or equal to traversal size. Default is MaxValue (i.e. hits.Length).
- maxFragsThe maximum number of fragments to score by the highlighter.
- fragSizeThe length of fragments.
- fieldsThe fields to highlight. If not specified all fields will be highlighted (or at least attempted).
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.
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.