Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 516CEDCE0 for ; Tue, 30 Oct 2012 13:10:17 +0000 (UTC) Received: (qmail 18209 invoked by uid 500); 30 Oct 2012 13:10:15 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 17949 invoked by uid 500); 30 Oct 2012 13:10:13 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 17873 invoked by uid 99); 30 Oct 2012 13:10:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2012 13:10:12 +0000 Date: Tue, 30 Oct 2012 13:10:12 +0000 (UTC) From: "Michael McCandless (JIRA)" To: dev@lucene.apache.org Message-ID: <636932741.44352.1351602612594.JavaMail.jiratomcat@arcas> In-Reply-To: <1251097258.44223.1351598173825.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (LUCENE-4514) Make Scorer.freq() well defined: number of matches in doc MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-4514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486852#comment-13486852 ] Michael McCandless commented on LUCENE-4514: -------------------------------------------- Patch looks good! bq. 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. +1 > 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