From lucene-user-return-7325-apmail-jakarta-lucene-user-archive=jakarta.apache.org@jakarta.apache.org Tue Mar 02 13:35:47 2004 Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 19712 invoked from network); 2 Mar 2004 13:35:47 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Mar 2004 13:35:47 -0000 Received: (qmail 5932 invoked by uid 500); 2 Mar 2004 13:35:37 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 5859 invoked by uid 500); 2 Mar 2004 13:35:36 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 5794 invoked from network); 2 Mar 2004 13:35:36 -0000 Received: from unknown (HELO web12705.mail.yahoo.com) (216.136.173.242) by daedalus.apache.org with SMTP; 2 Mar 2004 13:35:36 -0000 Message-ID: <20040302133534.20345.qmail@web12705.mail.yahoo.com> Received: from [194.152.209.196] by web12705.mail.yahoo.com via HTTP; Tue, 02 Mar 2004 05:35:34 PST Date: Tue, 2 Mar 2004 05:35:34 -0800 (PST) From: Otis Gospodnetic Subject: Re: Search one keyword in two fields - How? To: Lucene Users List In-Reply-To: <13630.1078234065@www39.gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N You can use MultiFieldQueryParser, or you can construct a BooleanQuery with two TermQueries as its two clauses, and combine them with OR. Otis --- Karl Koch wrote: > Hi, > > hat do I need to search for one single keyword in two fields of one > index? > Can someone provide an easy example or tell me where to find it? > > Cheers, > Karl > > -- > +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter > Virenschutz +++ > 100% Virenerkennung nach Wildlist. Infos: > http://www.gmx.net/virenschutz > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org