Return-Path: Delivered-To: apmail-lucene-commits-archive@www.apache.org Received: (qmail 58552 invoked from network); 28 Feb 2005 00:48:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 28 Feb 2005 00:48:19 -0000 Received: (qmail 52250 invoked by uid 500); 28 Feb 2005 00:48:18 -0000 Mailing-List: contact commits-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 commits@lucene.apache.org Received: (qmail 52237 invoked by uid 500); 28 Feb 2005 00:48:18 -0000 Delivered-To: apmail-incubator-lucene4c-cvs@incubator.apache.org Received: (qmail 52233 invoked by uid 99); 28 Feb 2005 00:48:18 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Sun, 27 Feb 2005 16:48:18 -0800 Received: (qmail 58545 invoked by uid 65534); 28 Feb 2005 00:48:17 -0000 Message-ID: <20050228004817.58544.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Mon, 28 Feb 2005 00:48:17 -0000 Subject: svn commit: r155655 - in incubator/lucene4c/trunk: src/search/scorer.c test/search/scorer_test.c To: lucene4c-cvs@incubator.apache.org From: rooneg@apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: rooneg Date: Sun Feb 27 16:48:15 2005 New Revision: 155655 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D155655 Log: Get a bit closer to boolean queries working. It's still not totally right, since we're missing out on the last document because we bail when moving the previous scorer ahead the next time through the loop. Oops. I Still need to find a good way to avoid that little problem... * src/search/scorer.c (pick_scorer): skip duplicate documents so they don't come up later. * test/search/scorer_test.c (test_boolean_scorer): correct the count we're expecting, since we started counting at zero we want one less than the actual total number of hits. Modified: incubator/lucene4c/trunk/src/search/scorer.c incubator/lucene4c/trunk/test/search/scorer_test.c Modified: incubator/lucene4c/trunk/src/search/scorer.c URL: http://svn.apache.org/viewcvs/incubator/lucene4c/trunk/src/search/scor= er.c?view=3Ddiff&r1=3D155654&r2=3D155655 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/lucene4c/trunk/src/search/scorer.c (original) +++ incubator/lucene4c/trunk/src/search/scorer.c Sun Feb 27 16:48:15 2005 @@ -110,6 +110,11 @@ bsb->last_scorer =3D scorer; lowest =3D doc; } + else if (doc =3D=3D lowest) + { + /* move on to avoid duplicates next time around... */ + LCN_ERR (lcn_scorer_next (scorer)); + } } } =20 Modified: incubator/lucene4c/trunk/test/search/scorer_test.c URL: http://svn.apache.org/viewcvs/incubator/lucene4c/trunk/test/search/sco= rer_test.c?view=3Ddiff&r1=3D155654&r2=3D155655 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/lucene4c/trunk/test/search/scorer_test.c (original) +++ incubator/lucene4c/trunk/test/search/scorer_test.c Sun Feb 27 16:48:15 = 2005 @@ -175,7 +175,7 @@ ABTS_INT_EQUAL (tc, APR_EOF, err->apr_err); =20 /* expected to fail for now, should queries aren't quite working yet */ - ABTS_INT_EQUAL (tc, 114, count); + ABTS_INT_EQUAL (tc, 113, count); =20 apr_pool_clear (p); }