return the best fragments.

Namespace: Lucene.Net.Search.Vectorhighlight
Assembly: Lucene.Net.FastVectorHighlighter (in Lucene.Net.FastVectorHighlighter.dll) Version: 2.9.2.0 (2.9.2)

Syntax

C#
public string[] GetBestFragments(
	FieldQuery fieldQuery,
	IndexReader reader,
	int docId,
	string fieldName,
	int fragCharSize,
	int maxNumFragments
)
Visual Basic
Public Function GetBestFragments ( _
	fieldQuery As FieldQuery, _
	reader As IndexReader, _
	docId As Integer, _
	fieldName As String, _
	fragCharSize As Integer, _
	maxNumFragments As Integer _
) As String()
Visual C++
public:
array<String^>^ GetBestFragments(
	FieldQuery^ fieldQuery, 
	IndexReader^ reader, 
	int docId, 
	String^ fieldName, 
	int fragCharSize, 
	int maxNumFragments
)

Parameters

fieldQuery
Type: Lucene.Net.Search.Vectorhighlight..::..FieldQuery
FieldQuery object
reader
Type: Lucene.Net.Index..::..IndexReader
IndexReader of the index
docId
Type: System..::..Int32
document id to be highlighted
fieldName
Type: System..::..String
field of the document to be highlighted
fragCharSize
Type: System..::..Int32
the length (number of chars) of a fragment
maxNumFragments
Type: System..::..Int32
maximum number of fragments

Return Value

created fragments or null when no fragments created. Size of the array can be less than maxNumFragments

See Also