Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 69841 invoked from network); 11 Aug 2009 20:30:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Aug 2009 20:30:32 -0000 Received: (qmail 34318 invoked by uid 500); 11 Aug 2009 20:30:38 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 34244 invoked by uid 500); 11 Aug 2009 20:30:38 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 34236 invoked by uid 99); 11 Aug 2009 20:30:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Aug 2009 20:30:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Aug 2009 20:30:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 778D8234C004 for ; Tue, 11 Aug 2009 13:30:16 -0700 (PDT) Message-ID: <1953165364.1250022616484.JavaMail.jira@brutus> Date: Tue, 11 Aug 2009 13:30:16 -0700 (PDT) From: "Mark Miller (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-533) SpanQuery scoring: SpanWeight lacks a recursive traversal of the query tree In-Reply-To: <1963226791.1143623118580.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742045#action_12742045 ] Mark Miller commented on LUCENE-533: ------------------------------------ Paul: Spans is breaking back compat in this release. This is the opportunity to change anything. Do you think we should add something like this? Do you think it might make sense to make Spans abstract? Its an interface thats gaining methods this release, so back compat is gone anyway (Spans back compat was lost in the last release, and we are correcting things to a degree in 2.9). If we can help pave the way for the future in a reasonably small amount of time - this is likely the best opportunity. > SpanQuery scoring: SpanWeight lacks a recursive traversal of the query tree > --------------------------------------------------------------------------- > > Key: LUCENE-533 > URL: https://issues.apache.org/jira/browse/LUCENE-533 > Project: Lucene - Java > Issue Type: Bug > Components: Search > Affects Versions: 1.9 > Reporter: Vincent Le Maout > Priority: Minor > > I found the computing of weights to be somewhat different according to the query type (BooleanQuery versus SpanQuery) : > org.apache.lucene.search.BooleanQuery.BooleanWeight : > public BooleanWeight(Searcher searcher) > throws IOException { > this.similarity = getSimilarity(searcher); > for (int i = 0 ; i < clauses.size(); i++) { > BooleanClause c = (BooleanClause)clauses.elementAt(i); > weights.add(c.getQuery().createWeight(searcher)); > } > } > which looks like a recursive descent through the tree, taking into account the weights of all the nodes, whereas : > org.apache.lucene.search.spans.SpanWeight : > public SpanWeight(SpanQuery query, Searcher searcher) > throws IOException { > this.similarity = query.getSimilarity(searcher); > this.query = query; > this.terms = query.getTerms(); > idf = this.query.getSimilarity(searcher).idf(terms, searcher); > } > lacks any traversal and according to what I have understood so far from the rest > of the code, only takes into account the boost of the tree root in SumOfSquareWeights(), > which is consistent with the resulting scores not considering the boost of the tree > leaves. > vintz -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org