Return-Path: X-Original-To: apmail-lucy-user-archive@www.apache.org Delivered-To: apmail-lucy-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2E2391060B for ; Wed, 25 Sep 2013 19:51:05 +0000 (UTC) Received: (qmail 26758 invoked by uid 500); 25 Sep 2013 19:51:05 -0000 Delivered-To: apmail-lucy-user-archive@lucy.apache.org Received: (qmail 26701 invoked by uid 500); 25 Sep 2013 19:51:00 -0000 Mailing-List: contact user-help@lucy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@lucy.apache.org Delivered-To: mailing list user@lucy.apache.org Received: (qmail 26681 invoked by uid 99); 25 Sep 2013 19:50:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Sep 2013 19:50:59 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.139.213.55] (HELO nm17-vm1.bullet.mail.bf1.yahoo.com) (98.139.213.55) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Sep 2013 19:50:53 +0000 Received: from [66.196.81.170] by nm17.bullet.mail.bf1.yahoo.com with NNFMP; 25 Sep 2013 19:50:32 -0000 Received: from [98.139.212.241] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 25 Sep 2013 19:50:32 -0000 Received: from [127.0.0.1] by omp1050.mail.bf1.yahoo.com with NNFMP; 25 Sep 2013 19:50:32 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 560866.50333.bm@omp1050.mail.bf1.yahoo.com Received: (qmail 21807 invoked by uid 60001); 25 Sep 2013 19:50:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1380138632; bh=fxDtzpvnMRVKLTTsy7mq3mLgRKAiavfJPYiBtLbhdE0=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=RJplfLjF7wWAAFXr3m/lY6Ad0weg3F2z7De4WwqI7Nio1+QVvJv5Tnc3pOYVnqCrBRyzWeTO7ZGR2f1/NmGbffd2vQakHtgOFLtdtVNNXdadUIog5KsljnLeBM0IOlD4y/wdDq3amoqrszhmz2Zwnh5yrwemqDxdAA/1XxTKN84= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=yfTrp9DOQcqM4Mwov7hWRyrMPzJrBHobH4kTB2sfmJqmhlftHbE+2dTDervHw7oqCqlbM+F1+ZTyF/o9FGsGzjQLriR/k2IdJOIUIY9ga0IN96jEwa/Egl1+OE3Uv8O6EkFSxvRoViASRNOznOaZW7Am/1a8FHBoslX+itL79Wo=; X-YMail-OSG: vlC15ZIVM1nIH5aY7Hp.WJ71Z5ReRwOvVTKMj2tFs2OxnOO O07GSNXXUSoguD_0- Received: from [71.95.75.77] by web140506.mail.bf1.yahoo.com via HTTP; Wed, 25 Sep 2013 12:50:31 PDT X-Rocket-MIMEInfo: 002.001,SGkgUGV0ZXIsCgoKV2hlbiBJIHJ1biB0aGUgcHJvZ3JhbSBiZWxvdyBmb3IgZGlmZmVyZW50IHF1ZXJpZXMsIGl0IGdpdmVzIG1lIGRpZmZlcmVudCB2YWx1ZXMgZm9yICRoaXRfY291bnQgYW5kIG51bWJlciBvZiBlbGVtZW50cyBpbiB0aGUgYXJyYXkgQGRvY19pZHMgLsKgIEBkb2NfaWRzIGFsd2F5cyBzaG93cyAxMCBlbGVtZW50cyBldmVuIGZvciBkaWZmZXJlbnQgcXVlcmllcywgd2hpbGXCoCAkaGl0X2NvdW50IHZhbHVlIGNoYW5nZXMgd2l0aCBxdWVyeS4gTWF5IGJlIEkgYW0gbWlzc2luZyBzb21ldGgBMAEBAQE- X-Mailer: YahooMailWebService/0.8.157.561 References: <1380044695.36231.YahooMailNeo@web140504.mail.bf1.yahoo.com> <5241D3B7.2020803@peknet.com> Message-ID: <1380138631.21222.YahooMailNeo@web140506.mail.bf1.yahoo.com> Date: Wed, 25 Sep 2013 12:50:31 -0700 (PDT) From: Anil Pachuri Reply-To: Anil Pachuri To: "user@lucy.apache.org" , "peter@peknet.com" In-Reply-To: <5241D3B7.2020803@peknet.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="1594581660-467356722-1380138631=:21222" X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [lucy-user] document IDs --1594581660-467356722-1380138631=:21222 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi Peter,=0A=0A=0AWhen I run the program below for different queries, it gi= ves me different values for $hit_count and number of elements in the array = @doc_ids .=A0 @doc_ids always shows 10 elements even for different queries,= while=A0 $hit_count value changes with query. May be I am missing somethin= g.=0AThanks, Anil=0A=0A=0Amy $searcher =3D Lucy::Search::IndexSearcher->new= ( =0Aindex =3D> $path_to_index,=0A);=0A=0Amy $qparser =3D Lucy::Search::Que= ryParser->new( =0Aschema =3D> $searcher->get_schema,=0Adefault_boolop =3D> = 'OR',=0A);=0A=0Amy $query =3D $qparser->parse('query');=0A=0Amy $hits =3D $= searcher->hits(=0Aquery =3D> $query,=0A);=0A=0Amy $hit_count =3D $hits->tot= al_hits;=0Aprint "$hit_count\n";=0A=0Amy @doc_ids;=0Awhile ( my $hit_doc = =3D $hits->next ) {=0Apush @doc_ids, $hit_doc->get_doc_id();=0A}=0A=0Aprint= "@doc_ids\n";=0A=0A=0A=0A=0A=0A________________________________=0A From: P= eter Karman =0ATo: user@lucy.apache.org =0ASent: Tuesday,= September 24, 2013 1:02 PM=0ASubject: Re: [lucy-user] document IDs=0A =0A= =0AOn 9/24/13 12:44 PM, Anil Pachuri wrote:=0A=0A> # something like:=0A> my= $docIDs =3D $hits->doc_ids;=0A>=0A=0Amy @doc_ids;=0A=0Awhile ( my $hit_doc= =3D $hits->next ) {=0A=A0 =A0 push @doc_ids, $hit_doc->get_doc_id();=0A}= =0A=0Ahttps://metacpan.org/module/Lucy::Document::Doc=0A=0A-- Peter Karman= =A0 .=A0 http://peknet.com/=A0 .=A0 peter@peknet.com --1594581660-467356722-1380138631=:21222--