Computes the normalization value for a field given the total number of
terms contained in a field. These values, together with field boosts, are
stored in an index and multipled into scores for hits on each field by the
search code.
Matches in longer fields are less precise, so implementations of this
method usually return smaller values when
CopyC#
is large,
and larger values when
CopyC#
is small.
Note that the return values are computed under
{@link Lucene.Net.Index.IndexWriter#AddDocument(Lucene.Net.Documents.Document)}
and then stored using
{@link #EncodeNorm(float)}.
Thus they have limited precision, and documents
must be re-indexed if this method is altered.
Namespace: Lucene.Net.SearchAssembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1
Syntax
Visual Basic |
---|
Public MustOverride Function LengthNorm ( _
fieldName As String, _
numTokens As Integer _
) As Single |
Visual C++ |
---|
public:
virtual float LengthNorm(
String^ fieldName,
int numTokens
) abstract |
Return Value
a normalization factor for hits on this field of this document
See Also
[!:Lucene.Net.Documents.Field.SetBoost(float)]