lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: How to search multiple fields using multiple search terms
Date Thu, 15 Apr 2010 23:32:50 GMT
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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message