/// <summary> /// Encodes the document length in the same way as <see cref="TFIDFSimilarity"/>. </summary> public override long ComputeNorm(FieldInvertState state) { float numTerms; if (discountOverlaps) { numTerms = state.Length - state.NumOverlap; } else { numTerms = state.Length; } return(EncodeNormValue(state.Boost, numTerms)); }
public override sealed long ComputeNorm(FieldInvertState state) { return Get(state.Name).ComputeNorm(state); }
/// <summary> /// Computes the normalization value for a field, given the accumulated /// state of term processing for this field (see <see cref="FieldInvertState"/>). /// /// <para/>Matches in longer fields are less precise, so implementations of this /// method usually set smaller values when <c>state.Length</c> is large, /// and larger values when <code>state.Length</code> is small. /// <para/> /// @lucene.experimental /// </summary> /// <param name="state"> current processing state for this field </param> /// <returns> computed norm value </returns> public abstract long ComputeNorm(FieldInvertState state);
public override long ComputeNorm(FieldInvertState state) { return(m_sims[0].ComputeNorm(state)); }