Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 6576 invoked from network); 3 Nov 2006 18:56:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Nov 2006 18:56:38 -0000 Received: (qmail 85948 invoked by uid 500); 3 Nov 2006 18:56:43 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 85920 invoked by uid 500); 3 Nov 2006 18:56:42 -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 85909 invoked by uid 99); 3 Nov 2006 18:56:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Nov 2006 10:56:42 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of DORONC@il.ibm.com designates 195.212.29.154 as permitted sender) Received: from [195.212.29.154] (HELO mtagate5.de.ibm.com) (195.212.29.154) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Nov 2006 10:56:28 -0800 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.8/8.13.8) with ESMTP id kA3Iu6bg325496 for ; Fri, 3 Nov 2006 18:56:06 GMT Received: from d12av04.megacenter.de.ibm.com (d12av04.megacenter.de.ibm.com [9.149.165.229]) by d12nrmr1607.megacenter.de.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id kA3Ix4mp3174468 for ; Fri, 3 Nov 2006 19:59:04 +0100 Received: from d12av04.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id kA3Iu5WP000567 for ; Fri, 3 Nov 2006 19:56:05 +0100 Received: from d12mc102.megacenter.de.ibm.com (d12mc102.megacenter.de.ibm.com [9.149.167.114]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id kA3Iu58p000564 for ; Fri, 3 Nov 2006 19:56:05 +0100 In-Reply-To: <7153721.post@talk.nabble.com> Subject: Re: search within search To: java-user@lucene.apache.org X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 Message-ID: From: Doron Cohen Date: Fri, 3 Nov 2006 10:25:44 -0800 X-MIMETrack: Serialize by Router on D12MC102/12/M/IBM(Release 7.0.1HF269 | June 22, 2006) at 03/11/2006 20:59:03 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org spinergywmy wrote on 03/11/2006 00:40:42: > I have another problem is I do not perform the real search within search > feature which according to the way that I have coded, because for the second > time searching, I actually go back to the index directory to search the > entire indeces again rather then cached the first time search result. > > How can I solve this problem? Do I need to use queryFilter and > reconstruct the codes again, and that is time consuming, is there any how I > can get it done without reconstruct. Or do I need to use bitSet within my > existing codes. This was the recommendation you got on this in the list (forgot who it was): submit query1 ANDed with query2. True, this is searching again the "entire" index. In particular, it is re-doing work already done for query1. However this is the simplest approach, with equivalent results. Unless you are facing performance problems this should be sufficient. If however, you are facing performance issues, say, if the queries are very large, and the index is large as well, and you have more than 2 stages (search within (search within (search within search (...)))), and resubmitting a larger and larger boolean query is out of the question - you can go with the filter approach. For this you can use your hit collector, which, while query1 is processed, would populate a bitset to be used for a filter for query2, should that be requested by the user. But I wouldn't go there if I don't have to. Doron --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org