lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-4514) Make Scorer.freq() well defined: number of matches in doc
Date Tue, 30 Oct 2012 12:04:12 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-4514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Robert Muir updated LUCENE-4514:
--------------------------------

    Attachment: LUCENE-4514.patch

prototype patch: core tests pass.

Really to make the SloppyPhraseScorer cleaner I think we should (unrelated) collapse it into
the abstract PhraseScorer, of which its the only subclass now that ExactPhraseScorer extends
Scorer directly.
                
> Make Scorer.freq() well defined: number of matches in doc
> ---------------------------------------------------------
>
>                 Key: LUCENE-4514
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4514
>             Project: Lucene - Core
>          Issue Type: Task
>          Components: core/query/scoring
>            Reporter: Robert Muir
>         Attachments: LUCENE-4514.patch
>
>
> Today Scorer.freq() is somewhat useless: because in general it returns the number of
matches, but other times it returns a strange floating point value (essentially an intermediate
score).
> I think it should just return the number of matches in the document. This makes it well-defined
and useful to consumers (e.g. if they are going to iterate over the positions or whatever
in the future).
> {noformat}
>    /** Returns number of matches for the current document.
> -   *  This returns a float (not int) because
> -   *  SloppyPhraseScorer discounts its freq according to how
> -   *  "sloppy" the match was.
>     *
>     * @lucene.experimental */
> -  public abstract float freq() throws IOException;
> +  public abstract int freq() throws IOException;
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message