return the best fragment.

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 GetBestFragment(
	FieldQuery fieldQuery,
	IndexReader reader,
	int docId,
	string fieldName,
	int fragCharSize
)
Visual Basic
Public Function GetBestFragment ( _
	fieldQuery As FieldQuery, _
	reader As IndexReader, _
	docId As Integer, _
	fieldName As String, _
	fragCharSize As Integer _
) As String
Visual C++
public:
String^ GetBestFragment(
	FieldQuery^ fieldQuery, 
	IndexReader^ reader, 
	int docId, 
	String^ fieldName, 
	int fragCharSize
)

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

Return Value

the best fragment (snippet) string

See Also