Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 10551 invoked from network); 2 Aug 2007 09:26:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Aug 2007 09:26:19 -0000 Received: (qmail 53774 invoked by uid 500); 2 Aug 2007 09:26:14 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 53516 invoked by uid 500); 2 Aug 2007 09:26:13 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 53505 invoked by uid 99); 2 Aug 2007 09:26:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2007 02:26:13 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mnrz57@gmail.com designates 209.85.132.246 as permitted sender) Received: from [209.85.132.246] (HELO an-out-0708.google.com) (209.85.132.246) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2007 09:26:06 +0000 Received: by an-out-0708.google.com with SMTP id c5so82880anc for ; Thu, 02 Aug 2007 02:25:46 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=YXt6yEFnhBlQFB/hFdTR4HFnv2Cn/yBgmPnL6i6DI+lHuCrv17zL/oD+N7lkHXHEdwoBnQm55paViKMniKpbc8vd5ByUVuwUOmR6nHyGGgpRNmGS3US9VsWvmBNB4Drt6SHfdzdALSS3jK/lzh6T3BX3PRvqqnTUjVC5pfnbtEk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=LHDlOXyiVWcU3rds14vks9MXpxrAOJCJx1dmKvlnyAcuopIewX3km0UULxueNALOEWBsmRCIxBbjI6VzXdLGnslhRzZoo7VPZDuh4eO/B9pdkrpctR2JliV6AgMf3zuQL5daQ1AwhZhEiKJ+I3O+K+WvBG/+aAo/DIxnpkll9Ko= Received: by 10.100.7.18 with SMTP id 18mr960525ang.1186046745959; Thu, 02 Aug 2007 02:25:45 -0700 (PDT) Received: by 10.100.14.12 with HTTP; Thu, 2 Aug 2007 02:25:45 -0700 (PDT) Message-ID: <34b8543c0708020225x435f0ad6s4869cd739107bc66@mail.gmail.com> Date: Thu, 2 Aug 2007 12:55:45 +0330 From: "Mohammad Norouzi" To: java-user@lucene.apache.org Subject: Re: Getting only the Ids, not the whole documents. In-Reply-To: <11961159.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_102163_19945325.1186046745830" References: <11960750.post@talk.nabble.com> <34b8543c0708020200s82acc82oe9c2e360d527f2db@mail.gmail.com> <11961159.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_102163_19945325.1186046745830 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline yes it decrease the performance but the only solution. I've spent many weeks to find best way to retrive my own IDs but find this way as last one now I am storing the ids in a BitSet structure and it's fast enough public void collect(...){ idBitSet.set(Integer.valueOf(searcher.doc(id).get("MyOwnID"))); } On 8/2/07, makkhar wrote: > > > > Hi, > > The solution you suggested will definitely work but will definitely > slow > down my search by an order of magnitude. The problem I am trying to solve > is > performance, thats why I need the collection of IDs and not the whole > documents. > > - thanks for the prompt reply. > > > is_maximum wrote: > > > > yes if you extend your class from HitCollector and override the > collect() > > mthod with following signature you can get IDs > > > > public void collect(int id, float score) > > > > On 8/2/07, makkhar wrote: > >> > >> > >> Hi all, > >> > >> Can I get just a list of document Ids given a search criteria ? To > >> elaborate here is my situation: > >> > >> I store 20000 contracts in the file system index each with some > >> parameterName and Value. Given a search criterion - > (paramValue='draft'). > >> I > >> need to get just an ArrayList of Strings containing contract Ids. I > dont > >> need the lucene documents, just the Ids. > >> > >> Can this be done ? > >> > >> -thanks > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Getting-only-the-Ids%2C-not-the-whole-documents.-tf4204907.html#a11960750 > >> Sent from the Lucene - Java Users mailing list archive at Nabble.com. > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > >> For additional commands, e-mail: java-user-help@lucene.apache.org > >> > >> > > > > > > -- > > Regards, > > Mohammad > > -------------------------- > > see my blog: http://brainable.blogspot.com/ > > another in Persian: http://fekre-motefavet.blogspot.com/ > > > > > > -- > View this message in context: > http://www.nabble.com/Getting-only-the-Ids%2C-not-the-whole-documents.-tf4204907.html#a11961159 > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > -- Regards, Mohammad -------------------------- see my blog: http://brainable.blogspot.com/ another in Persian: http://fekre-motefavet.blogspot.com/ ------=_Part_102163_19945325.1186046745830--