Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 32312 invoked from network); 15 Jul 2010 10:29:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jul 2010 10:29:14 -0000 Received: (qmail 28442 invoked by uid 500); 15 Jul 2010 10:29:12 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 27935 invoked by uid 500); 15 Jul 2010 10:29:09 -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 27924 invoked by uid 99); 15 Jul 2010 10:29:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 10:29:08 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ian.lea@gmail.com designates 209.85.214.48 as permitted sender) Received: from [209.85.214.48] (HELO mail-bw0-f48.google.com) (209.85.214.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 10:29:00 +0000 Received: by bwz2 with SMTP id 2so734940bwz.35 for ; Thu, 15 Jul 2010 03:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=UeFWGIPziQttPmRaOJbHSlrYJ1bfbvZDPpYE6kv3mes=; b=YC/lsr8hhTH37ay4UU/V4vQgGKvRtUSiwoyk7l2aUYrrbEVp19T9MiYlCTy5WfY3Io FtLoxnkWwV70fed7V9dyoD0v8AaQBx/+Mr3GD3Ewk9RnQMZu8jPNifFnqGtVtlTlPrte HBtot24E4AlOh/e+2NOr71C0HeMAlgl2aZ63c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=d+JoUNBzk3QdrXfl+E6SkFgwPcBnSAOD0TtL88hoN1hjMx7SvqiJakw/5EwhuO9XyR Qf8rJWKjB9HIDZS+OIIXpDgWEnT81LCjmb6zyoPYD/W+8P2FALWSqajzik01s3O+JV6F VDnPj5RosxftHJ46pPaEAWcqLnm9XI83i84xM= Received: by 10.204.133.146 with SMTP id f18mr13272087bkt.97.1279189660258; Thu, 15 Jul 2010 03:27:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.57.69 with HTTP; Thu, 15 Jul 2010 03:27:20 -0700 (PDT) In-Reply-To: References: From: Ian Lea Date: Thu, 15 Jul 2010 11:27:20 +0100 Message-ID: Subject: Re: subset query :query filter or boolean query To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Loads of questions ... some answers below. > I have 4 query search fields. > > case 1 : if i use one search > field to make a query filter and then use the query filter to search on > other 3 fields so as to reduce the searching docs subset. > > case 2: i use > all query parameters using boolean query , whole of index will be searched. > > > Which of the two approach will give better performance.Or is there ne > other approach to do this . The filter approach is likely to be best if you can reuse the filter. > Also > > Can we use subset of documents , for > searching . Yes. > Lets say I have hash map of > > P1 -1,2,3,4 > > P2 - 3,4,5 > > > P3-7,5,3 > > Now I have an documents in lucene index stored as > > 1-P1 > > > 2-P1 > > 3-P1,P2,P3 > > 4-P1,P2 > > 5-P2,P3 > > 7-P3 > > .. > > .. > > when i search > docs with P2 I get 3,4,5 > > Now I want my search to b restricted to just > 3,4,5 doc only. where by I can search only these docs for further > parameters. > > 1. How to go abt it. Boolean query with multiple nested queries. > 2. Is there any other seraching > mechanism I should use, or Lucene is better fit? Lucene. > 3. should i keep my hash > map also in lucene indexes and is then thr a method to link it to another > lucene indexes. You can store whatever you want in lucene, and it can make sense to do so, but if the data is already stored elsewhere and easily accessible you may choose not to. It would be up to you to provide any linkage. -- Ian. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org