By default, no scores are computed when sorting by field (using {@link #Search(Query,Filter,int,Sort)}). You can change that, per IndexSearcher instance, by calling this method. Note that this will incur a CPU cost.

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

Syntax

C#
public virtual void SetDefaultFieldSortScoring(
	bool doTrackScores,
	bool doMaxScore
)
Visual Basic
Public Overridable Sub SetDefaultFieldSortScoring ( _
	doTrackScores As Boolean, _
	doMaxScore As Boolean _
)
Visual C++
public:
virtual void SetDefaultFieldSortScoring(
	bool doTrackScores, 
	bool doMaxScore
)

Parameters

doTrackScores
Type: System..::..Boolean
If true, then scores are returned for every matching document in {@link TopFieldDocs}.
doMaxScore
Type: System..::..Boolean
If true, then the max score for all matching docs is computed.

See Also