lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: PhraseQuery issues - differences with SpanNearQuery
Date Fri, 05 Sep 2008 15:00:45 GMT

> SpanScorer will use the similarity slop factor for each matching
> span size to adjust the effective frequency.
>
>
> Regards,
> Paul Elschot
>   
You have pointed this out to me before. One day I will remember <g> 
Every time I look things over again I miss it, and I couldn't find that 
email in the archives. Its done here if original questioner is intersted:

SpanScorer

  protected boolean setFreqCurrentDoc() throws IOException {
    if (! more) {
      return false;
    }
    doc = spans.doc();
    freq = 0.0f;
    while (more && doc == spans.doc()) {
      int matchLength = spans.end() - spans.start();
      freq += getSimilarity().sloppyFreq(matchLength);
      more = spans.next();
    }
    return more || (freq != 0);
  }

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message