Lucene.Net.Search.DefaultSimilarity.ComputeNorm C# (CSharp) Method

ComputeNorm() public method

Implemented as state.getBoost()*lengthNorm(numTerms), where numTerms is FieldInvertState.GetLength() if SetDiscountOverlaps is false, else it's FieldInvertState.GetLength() - FieldInvertState.GetNumOverlap() .

WARNING: This API is new and experimental, and may suddenly change.

public ComputeNorm ( System field, Lucene.Net.Index.FieldInvertState state ) : float
field System
state Lucene.Net.Index.FieldInvertState
return float
		public override float ComputeNorm(System.String field, FieldInvertState state)
		{
			int numTerms;
			if (internalDiscountOverlaps)
				numTerms = state.Length - state.NumOverlap;
			else
				numTerms = state.Length;
			return (state.Boost * LengthNorm(field, numTerms));
		}