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 98F1310874 for ; Tue, 29 Oct 2013 23:07:26 +0000 (UTC) Received: (qmail 59156 invoked by uid 500); 29 Oct 2013 23:07:25 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 59107 invoked by uid 500); 29 Oct 2013 23:07:25 -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 59099 invoked by uid 99); 29 Oct 2013 23:07:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Oct 2013 23:07:25 +0000 Date: Tue, 29 Oct 2013 23:07:25 +0000 (UTC) From: "Kai Chan (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LUCENE-5315) Some subclasses of Scorer do not honor the contract of DocsEnum.freq() 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-5315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kai Chan updated LUCENE-5315: ----------------------------- Attachment: DisjunctionMaxQueryTest.java.output Here is the output of DisjunctionMaxQueryTest. For the freq() method, the return values (3, 4, 5) from TermScorer are term frequencies, while the return values (1, 2) from ConjunctionScorer and others are clause counts. > Some subclasses of Scorer do not honor the contract of DocsEnum.freq() > ---------------------------------------------------------------------- > > Key: LUCENE-5315 > URL: https://issues.apache.org/jira/browse/LUCENE-5315 > Project: Lucene - Core > Issue Type: Bug > Components: core/query/scoring > Affects Versions: 4.5.1 > Reporter: Kai Chan > Attachments: DisjunctionMaxQueryTest.java, DisjunctionMaxQueryTest.java.output > > > The behavior of Scorer.freq() is inconsistent across its subclasses: > * For TermScorer, the freq() method behaves just as DocsEnum.freq() specifies, i.e. the method returns the "term frequency in the current document". > * For BooleanScorer2, ConjunctionScorer, DisjunctionMaxScorer, DisjunctionSumScorer, and possibly other classes, the freq() method returns the number of clauses (in BooleanQuery or DisjunctionMaxQuery) that match the current document. > This difference makes the meaning of Scorer.freq()'s return value uncertain. To add to the uncertainty, given a Query, there seems to be no way of knowing which behavior takes effect (as that is not specified in the API reference) except by reading or running the code. > This issue might be related to LUCENE-4514. -- This message was sent by Atlassian JIRA (v6.1#6144) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org