Creates a comparator for the field in the given index.

Namespace: Lucene.Net.Search
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
ScoreDocComparator NewComparator(
	IndexReader reader,
	string fieldname
)
Visual Basic
Function NewComparator ( _
	reader As IndexReader, _
	fieldname As String _
) As ScoreDocComparator
Visual C++
ScoreDocComparator^ NewComparator(
	IndexReader^ reader, 
	String^ fieldname
)

Parameters

reader
Type: Lucene.Net.Index..::..IndexReader
Index to create comparator for.
fieldname
Type: System..::..String
Name of the field to create comparator for.

Return Value

Comparator of ScoreDoc objects.

See Also