lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kelvin Tan" <kel...@relevanz.com>
Subject Re: Recommended way of performing multi-field searches
Date Mon, 12 Nov 2001 13:33:08 GMT
I think I've addressed my little problem. What I did was extend QueryParser
and in that class, implement a method which constructs a Query based on the
appropriate fields (I tried taking a look at QueryParser.jj, but gave up
after awhile...:)

If anyone's interested, I'd be happy to donate the code.

Regards,
Kelvin

----- Original Message -----
From: Kelvin Tan <kelvin@relevanz.com>
To: Lucene Users List <lucene-user@jakarta.apache.org>
Sent: Monday, November 12, 2001 6:51 PM
Subject: Re: Recommended way of performing multi-field searches


> I'm looking for something a little more complex.
>
> If there are say 5 fields to be searched, and the same query needs to be
> searched across x fields, do we expect the user to type out
> "{field1}:{query} {field2}:{query}{field3}:{query} ...{fieldx}:{query}" ?
I
> think not...
>
> Which means that we've to implement something which adds the selected
fields
> to search programmatically...
>
> I'll take a look at QueryParser.jj and see what I can come up with...
>
> ----- Original Message -----
> From: Dave Kor <dave.kor@nexusedge.com>
> To: Lucene Users List <lucene-user@jakarta.apache.org>
> Sent: Monday, November 12, 2001 6:23 PM
> Subject: RE: Recommended way of performing multi-field searches
>
>
> > > This is a repost of a question posted to jGuru Lucene Forum.
> > > Didn't get a response there so I'm trying my luck here...
> > >
> > > What's the recommended way of performing multi-field searches?
> > >
> > >   a.. Programmatically adding a :[field] for each field to the
> > > query and parsing this query?
> >
> >
> > Just use the query parser, you can specify field specific searches using
> the
> > format field:text.
> > Eg, "title:cat author:james"
> >
> > Dave Kor Kian Wei
> > Consultant
> > Product Engineering
> > NexusEdge Technologies Pte. Ltd.
> > 6 Aljunied Ave 3, #01-02 (Level 4)
> > Singapore 389932
> > Tel : (+65)848-2552
> > Fax : (+65)747-4536
> > Web : www.nexusedge.com
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message