Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 40581 invoked from network); 5 Aug 2009 17:58:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Aug 2009 17:58:44 -0000 Received: (qmail 27368 invoked by uid 500); 5 Aug 2009 17:58:51 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 27282 invoked by uid 500); 5 Aug 2009 17:58:50 -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 27274 invoked by uid 99); 5 Aug 2009 17:58:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 17:58:50 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of peterlkeegan@gmail.com designates 74.125.78.26 as permitted sender) Received: from [74.125.78.26] (HELO ey-out-2122.google.com) (74.125.78.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 17:58:41 +0000 Received: by ey-out-2122.google.com with SMTP id 9so202468eyd.53 for ; Wed, 05 Aug 2009 10:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=dpYHcWbIlWJ2nf0QVo2dJfdn67ZC9/mXiSyeFWqRLbM=; b=X4VmZWL/P+cghgZS41Q/8k4H4H1hKspjqxwtjU0uHO073wx0m4RqDi2w9nrWtluBij FClDmqV+di11qiZJBj1GDbQn2krnIHbErw/7nW4CfplKKVYo51vSTVwIdAYYk5yfCvVc OUpQVNcwGz3/YAMe9lQRUOv4pivwkTFQ4W2L0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ObDSLNv1Q5Z2pumAHG/r/wQdm9MHwJx0+hBL3stFSqw4Nqd+4Q3V+Fa4ZyjCKUIvsR nPSq5TG27U06fpsfZoyOwg7pdg+/iogTD1OtdDzXLHtUa+RCpRk53DZsbgFtdLLvCkpB /FD/n2r55Qbdm+um54y2SzNqAOnjNvTkQWx6s= MIME-Version: 1.0 Received: by 10.210.140.9 with SMTP id n9mr8587603ebd.26.1249495099735; Wed, 05 Aug 2009 10:58:19 -0700 (PDT) In-Reply-To: References: <28A40832-94BB-4A44-8F8A-578D1D2D195A@apache.org> <4A799224.9010801@gmail.com> <222250B0-DC0F-47A2-A515-3C7A77CE0B73@apache.org> <4A799EC7.5080302@gmail.com> Date: Wed, 5 Aug 2009 13:58:19 -0400 Message-ID: Subject: Re: SpanQuery and BoostingTermQuery oddities From: Peter Keegan To: java-dev@lucene.apache.org Content-Type: multipart/alternative; boundary=001517475e6e9180b9047068bfd9 X-Virus-Checked: Checked by ClamAV on apache.org --001517475e6e9180b9047068bfd9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I got it to work by adding new overrides: public QueryWeight createQueryWeight(Searcher searcher) throws IOException public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) throws IOException But, it seems like it should still work with the old overrides: protected Weight createWeight(Searcher searcher) throws IOException public Scorer scorer(IndexReader reader) throws IOException Peter On Wed, Aug 5, 2009 at 12:29 PM, Peter Keegan wrote: > I ran into the same problem trying to update the BoostingNearQuery patch in > *LUCENE-1341 . > *The scorer never gets called. This used to work in 2.3.2 > > Peter > > > On Wed, Aug 5, 2009 at 11:01 AM, Mark Miller wrote: > >> Grant Ingersoll wrote: >> >>> >>> On Aug 5, 2009, at 10:07 AM, Mark Miller wrote: >>> >>>> Yeah - SpanQuery's don't use the boosts from subspans - it just uses the >>>> idf for the query terms and the span length I believe - and the boost for >>>> the top level Query. >>>> >>>> Is that the right way to go? I guess Doug seemed to think so? I don't >>>> know. It is sort of a bug that lower boosts would be ignored right? There is >>>> an issue for it somewhere. >>>> >>>> It gets complicated quick to change it - all of a sudden you need >>>> something like BooleanQuery ... >>>> >>>> >>> Not sure it needs BooleanQuery, but it does seem like it should take into >>> account the scores of the subclauses (regardless of BoostingTermQuery). >>> There is a spot in creating the SpanScorer where it gets the value from the >>> QueryWeight, but this QueryWeight does not account for the subclauses >>> QueryWeights. >>> >>> >> It doesn't need BooleanQuery - it needs BooleanQuery type logic - which is >> fairly complicated. At least to do it right I think. I don't have a clear >> memory of it, but I started to try and address this once and ... >> well I didn't continue. >> >> -- >> - Mark >> >> http://www.lucidimagination.com >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-dev-help@lucene.apache.org >> >> > --001517475e6e9180b9047068bfd9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I got it to work by adding new overrides:

=A0 public QueryWeight cre= ateQueryWeight(Searcher searcher) throws IOException
=A0 public Scorer = scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) thr= ows IOException

But, it seems like it should still work with the old overrides:

= protected Weight createWeight(Searcher searcher) throws IOException
publ= ic Scorer scorer(IndexReader reader) throws IOException

Peter


On Wed, Aug 5, 2009 at 12:29 PM, Peter K= eegan <peter= lkeegan@gmail.com> wrote:
I ran into the same problem trying to update the BoostingNearQuery patch in= LUCENE-1341.
The scorer never gets called. This used to= work in 2.3.2

Peter


On Wed, Aug 5, 2009 at 11:01 AM, Mark Miller &l= t;markrmiller@gm= ail.com> wrote:
Grant Ingersoll wrote:

On Aug 5, 2009, at 10:07 AM, Mark Miller wrote:
Yeah - SpanQuery's don't use the boosts from subspans - it just use= s the idf for the query terms and the span length I believe - and the boost= for the top level Query.

Is that the right way to go? I guess Doug seemed to think so? I don't k= now. It is sort of a bug that lower boosts would be ignored right? There is= an issue for it somewhere.

It gets complicated quick to change it - all of a sudden you need something= like BooleanQuery ...


Not sure it needs BooleanQuery, but it does seem like it should take into a= ccount the scores of the subclauses (regardless of BoostingTermQuery). =A0T= here is a spot in creating the SpanScorer where it gets the value from the = QueryWeight, but this QueryWeight does not account for the subclauses Query= Weights.


It doesn't need BooleanQuery - it needs BooleanQuery type logic - which= is fairly complicated. At least to do it right I think. I don't have a= clear memory of it, but I started to try and address this once and ...
well I didn't continue.


--
- Mark

http://www.lu= cidimagination.com




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



--001517475e6e9180b9047068bfd9--