Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 71055 invoked from network); 16 Dec 2008 16:07:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Dec 2008 16:07:15 -0000 Received: (qmail 2799 invoked by uid 500); 16 Dec 2008 16:07:20 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 2760 invoked by uid 500); 16 Dec 2008 16:07:20 -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 2749 invoked by uid 99); 16 Dec 2008 16:07:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 08:07:20 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [212.227.126.188] (HELO moutng.kundenserver.de) (212.227.126.188) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 16:07:05 +0000 Received: from aleppo.local (81-232-34-14-no35.tbcn.telia.com [81.232.34.14]) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis) id 0MKwtQ-1LCcRY2bC2-0000sx; Tue, 16 Dec 2008 17:06:44 +0100 Date: Tue, 16 Dec 2008 17:06:43 +0100 To: java-user@lucene.apache.org Subject: Re: newbie question on querying on multiple attributes From: "Hardy Ferentschik" Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 References: <21035723.post@talk.nabble.com> <541f12ca0812160757i595ec94cx786705d846909651@mail.gmail.com> Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <541f12ca0812160757i595ec94cx786705d846909651@mail.gmail.com> User-Agent: Opera Mail/9.60 (MacIntel) X-Provags-ID: V01U2FsdGVkX18dr2AnZbqRQKLcan8VpnQnGvlEmiKj4j2YQQ6 Eq5SKREzXcguCpbsK9pX8mPK8Er6HZFTGb4OINh3ib3Od5y0Br yYcusQIsmnWlpjqus1piSVlRbMwQ5Qz9Oxx4vzZd04= X-Virus-Checked: Checked by ClamAV on apache.org Hi, instead of the ClassBridge you can just annotate all the properties you want to index with @Field and build a BooleanQuery out of the input field. Indexing the properties into separate document fields is probably more extendable in the future when you for example only want to search on a subset of the properties. I recommend you read through the online documentation of Hibernate Search and you can also ask question at the Hibernate Search Forum - http://forum.hibernate.org/viewforum.php?f=9 which is probably a more appropriate then this mailing list. --Hardy On Tue, 16 Dec 2008 16:57:44 +0100, Stephane Nicoll wrote: > Consider the use of the ClassBridge in Hibernate Search. Very useful. It > basically allows you to merge multiple fields of your hibernate entity > into > a single lucene field. Once this is done, you can query this single field > from lucene without the need for BooleanQuery. > > HTH, > St�phane --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org