From general-return-1590-apmail-lucene-general-archive=lucene.apache.org@lucene.apache.org Tue Jul 28 16:39:10 2009 Return-Path: Delivered-To: apmail-lucene-general-archive@www.apache.org Received: (qmail 39386 invoked from network); 28 Jul 2009 16:39:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Jul 2009 16:39:10 -0000 Received: (qmail 16189 invoked by uid 500); 28 Jul 2009 16:40:27 -0000 Delivered-To: apmail-lucene-general-archive@lucene.apache.org Received: (qmail 16110 invoked by uid 500); 28 Jul 2009 16:40:27 -0000 Mailing-List: contact general-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@lucene.apache.org Delivered-To: mailing list general@lucene.apache.org Received: (qmail 16100 invoked by uid 99); 28 Jul 2009 16:40:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jul 2009 16:40:27 +0000 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=PLING_QUERY,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [85.25.71.29] (HELO mail.troja.net) (85.25.71.29) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jul 2009 16:40:17 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.troja.net (Postfix) with ESMTP id 10E9845ED5C; Tue, 28 Jul 2009 18:39:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.troja.net Received: from mail.troja.net ([127.0.0.1]) by localhost (megaira.troja.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r3Gc52YOiPjF; Tue, 28 Jul 2009 18:39:53 +0200 (CEST) Received: from VEGA (dslb-088-065-126-173.pools.arcor-ip.net [88.65.126.173]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.troja.net (Postfix) with ESMTPSA id 54E6A45ED57; Tue, 28 Jul 2009 18:39:53 +0200 (CEST) From: "Uwe Schindler" To: , References: <24664839.post@talk.nabble.com> <4A6CA0C5.2070209@ice-sa.com> <24670355.post@talk.nabble.com> <24671050.post@talk.nabble.com> <24701672.post@talk.nabble.com> <44FC07357EE24E8DB856430E5829A63C@VEGA> <24702697.post@talk.nabble.com> <0BAE8DA72BE44EF28F500743766342BC@VEGA> <4A6F281F.9010602@ice-sa.com> Subject: RE: Boolean query with 50,000 clauses! Possible? Scalable? Date: Tue, 28 Jul 2009 18:39:51 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcoPoS/TjTLWkpE7Sla717u3GGlbjwAACcQg In-Reply-To: <4A6F281F.9010602@ice-sa.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Virus-Checked: Checked by ClamAV on apache.org > If so, how does Lucene handle the case where a book has several authors, > each with a name, a weight, etc.. > How does one keep them "in sync", so that if I search for books that > have an author with first name "Robert" and who weighs more than 100 Kg, > I do not hit the ones that have a combination like this : > author #1 : Einstein, Albert, 101 Kg > author #2 : McNamara, Robert, 075 Kg This is not so simple using this approach. You can only do it with one combined field containing the author and weight, but then you cannot use NumericRangeQuery and must write more complicated queries by adding a PositionIncrement/Offset to the terms created and correlate the author and weight using this in a SpanQuery. But I understood the question different: "I want a query that gives every book document authored by people weighing more than 200lbs, with the ability of doing faceting and the likes." In this case it is irrelevant which author weights the 200 lbs, there must be only one, so a NumericRange line NumericRangeQuery.newFloatRange(field,200.0f,null,true,true) would do it. Uwe