lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy <andrh...@hotmail.com>
Subject RE: How to search multiple fields using multiple search terms
Date Fri, 16 Apr 2010 04:31:21 GMT

I am just getting started with Lucene so I didnt know you could just use a regular query parser.
 That seems to work.

Thanks


 
> Date: Thu, 15 Apr 2010 19:32:50 -0400
> Subject: Re: How to search multiple fields using multiple search terms
> From: erickerickson@gmail.com
> To: java-user@lucene.apache.org
> 
> Why are you locked into using MultiFieldQueryParser? The simpler approach is
> just send something like +title:abc +desc:123 through the regular query
> parser....
> 
> HTH
> Erick
> 
> On Thu, Apr 15, 2010 at 6:34 PM, Andy <andrhahn@hotmail.com> wrote:
> 
> >
> > Hi, I am trying to use the MultiFieldQueryParser to search "title" and
> > "desc" fields. However the Lucene API appears to only let me provide a
> > single search term. Is it possible to use multiple search terms (one for
> > each field)?
> >
> >
> >
> > For example, the SQL equivalent would be:
> >
> >
> > select *
> > from lucene
> > where title = 'abc'
> > and desc = '123'
> >
> >
> > Thanks!
> >
> > _________________________________________________________________
> > Hotmail has tools for the New Busy. Search, chat and e-mail from your
> > inbox.
> >
> > http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
> >
 		 	   		  
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message