public /*protected internal*/ virtual bool SetFreqCurrentDoc() { if (!more) { return(false); } doc = spans.Doc(); freq = 0.0f; do { int matchLength = spans.End() - spans.Start(); freq += Similarity.SloppyFreq(matchLength); more = spans.Next(); }while (more && (doc == spans.Doc())); return(true); }
protected internal override bool SetFreqCurrentDoc() { if (!more) { return(false); } doc = spans.Doc(); freq = 0.0f; payloadScore = 0; payloadsSeen = 0; Similarity similarity1 = GetSimilarity(); while (more && doc == spans.Doc()) { int matchLength = spans.End() - spans.Start(); freq += similarity1.SloppyFreq(matchLength); ProcessPayload(similarity1); more = spans.Next(); //this moves positions to the next match in this document } return(more || (freq != 0)); }