Mailing List Archive

Searching multiple fields in one Index of Documents
I have a working installation of Lucene running against indexes created by
a database query.
Each Document in the Index contains fifteen or twenty fields. I am
currently searching only one field (that contains concatenated database
columns) because I cannot figure out how to search multiple fields. So:

How can I use Lucene to search more than one field in an Index of Documents?

eg:
field CATEGORY is(or contains) 'bar'
AND
field BODY contains 'foo'




_________________

"The trouble with the rat-race is that even if you win you're still a rat."
--Lily Tomlin
_________________
Charles Harvey
Developer
http://www.philly.com
Wk: 215 789 6057
Cell: 215 588 0851


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Searching multiple fields in one Index of Documents [ In reply to ]
I have a bunch of html text boxes on a page to represent database fields and
then programmatically add the field name and a colon in front of each value
before sending it on to the QueryParser--like--> description:harley
keyword:jacket

When I need to search for the same thing across multiple fields I added a
field to the document when I indexed that had the values from ALL of the
fields, a bit redundant but I can't find a better way. I have 8 fields
indexed of 1.2 million documents for a grand total of 600MB and I still get
good search times.

Jonathan Pace
Sr Programmer Analyst
FedEx Services


----- Original Message -----
From: "Charles Harvey" <charvey@knightridder.com>
To: <lucene-user@jakarta.apache.org>
Sent: Monday, February 11, 2002 6:39 PM
Subject: Searching multiple fields in one Index of Documents


> I have a working installation of Lucene running against indexes created by
> a database query.
> Each Document in the Index contains fifteen or twenty fields. I am
> currently searching only one field (that contains concatenated database
> columns) because I cannot figure out how to search multiple fields. So:
>
> How can I use Lucene to search more than one field in an Index of
Documents?
>
> eg:
> field CATEGORY is(or contains) 'bar'
> AND
> field BODY contains 'foo'
>
>
>
>
> _________________
>
> "The trouble with the rat-race is that even if you win you're still a
rat."
> --Lily Tomlin
> _________________
> Charles Harvey
> Developer
> http://www.philly.com
> Wk: 215 789 6057
> Cell: 215 588 0851
>
>
> --
> 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>
Re: Searching multiple fields in one Index of Documents [ In reply to ]
Hi Charles,
Currently Lucene does not give you a query which will search all fields.
The easiest way to do this is to great a queryString will all the fields
based on the enteredSearchString.

So if someone enters "foobar" then convert this into
category:foobar OR body:foobar
where the format is [fieldname]:[query string]
Of course you can use AND or OR depending on what you want to accomplish.

Hope that helps.

--Peter

On Monday, February 11, 2002, at 04:39 PM, Charles Harvey wrote:

> I have a working installation of Lucene running against indexes created
> by a database query.
> Each Document in the Index contains fifteen or twenty fields. I am
> currently searching only one field (that contains concatenated database
> columns) because I cannot figure out how to search multiple fields. So:
>
> How can I use Lucene to search more than one field in an Index of
> Documents?
>
> eg:
> field CATEGORY is(or contains) 'bar'
> AND
> field BODY contains 'foo'
>
>
>
>
> _________________
>
> "The trouble with the rat-race is that even if you win you're still a
> rat."
> --Lily Tomlin
> _________________
> Charles Harvey
> Developer
> http://www.philly.com
> Wk: 215 789 6057
> Cell: 215 588 0851
>
>
> --
> 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>
Re: Searching multiple fields in one Index of Documents [ In reply to ]
Good idea, I had not though to delimit any of the params. I can operate in
that fashion, but it present a few problems:
All fields would have to be concatenated.
Date (Search by date < or >) would have to be pulled out to java
All IS queries would have to be pulled by java.

This means that I would have to get the entire result set back based only
on the actual word query, and then sort through the documents turning those
params into date object, etc - performing an entire extra set of search and
elimination operations... doubtlessly slowing the whole efficient process
down to a crawl.

However, if it is the only way...

I looked at the MultiSearcher, but that only seemed to possess the ability
to search multiple indexes, not fields. I also look at the multi-term
query, but the constructor for that only takes one term, not an array of
terms, and I don't see that a term can be constructed that contains
multiple terms !? I'm a bit lost as to why it should be called multi
anything in the first place.



At 03:50 PM 2/11/2002 -0600, you wrote:
>I have a bunch of html text boxes on a page to represent database fields and
>then programmatically add the field name and a colon in front of each value
>before sending it on to the QueryParser--like--> description:harley
>keyword:jacket
>
>When I need to search for the same thing across multiple fields I added a
>field to the document when I indexed that had the values from ALL of the
>fields, a bit redundant but I can't find a better way. I have 8 fields
>indexed of 1.2 million documents for a grand total of 600MB and I still get
>good search times.
>
>Jonathan Pace
>Sr Programmer Analyst
>FedEx Services
>
>
>----- Original Message -----
>From: "Charles Harvey" <charvey@knightridder.com>
>To: <lucene-user@jakarta.apache.org>
>Sent: Monday, February 11, 2002 6:39 PM
>Subject: Searching multiple fields in one Index of Documents
>
>
> > I have a working installation of Lucene running against indexes created by
> > a database query.
> > Each Document in the Index contains fifteen or twenty fields. I am
> > currently searching only one field (that contains concatenated database
> > columns) because I cannot figure out how to search multiple fields. So:
> >
> > How can I use Lucene to search more than one field in an Index of
>Documents?
> >
> > eg:
> > field CATEGORY is(or contains) 'bar'
> > AND
> > field BODY contains 'foo'
> >
> >
> >
> >
> > _________________
> >
> > "The trouble with the rat-race is that even if you win you're still a
>rat."
> > --Lily Tomlin
> > _________________
> > Charles Harvey
> > Developer
> > http://www.philly.com
> > Wk: 215 789 6057
> > Cell: 215 588 0851
> >
> >
> > --
> > 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>

_________________

"The trouble with the rat-race is that even if you win you're still a rat."
--Lily Tomlin
_________________
Charles Harvey
Developer
http://www.philly.com
Wk: 215 789 6057
Cell: 215 588 0851


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Searching multiple fields in one Index of Documents [ In reply to ]
So if I have three fields in my Document, labeled on insert into the
document as:
headline
category
pub_date


and I need all headlines that contain 'Bush'
from all stories with a category of 'National'
that were published on 2002/01/05:

Would I:

1. Have to have inserted upon concatenation all of this data into a single
field?
pub_date:2002/01/05 category:National headline:A whole lot of people really
love Bush

The query would be put together so?
pub_date:2002/01/05 AND category:National AND Bush
This doesn't seem like it would work specifically for the headline field,
though it would work just fine for the others... maybe a solution here
would be to tag entire fields before concatenation into the searchable
field and use regular expressions so we could query for
/<headline>.*Bush.*<\/headline>/i. Seems a bit complicated, though.

Or, does Lucene actually understand that the field:content is a field pointer?

The only other way that I can think would be usable (especially for date >
some_time) is to search only for the keyword query ('Bush' in this case),
enumerate through all of the Documents returned, add them to my own
collection, and then begin to weed them out condition by condition.

At 07:06 AM 2/12/2002 -0800, you wrote:
>Hi Charles,
>Currently Lucene does not give you a query which will search all fields.
>The easiest way to do this is to great a queryString will all the fields
>based on the enteredSearchString.
>
>So if someone enters "foobar" then convert this into
>category:foobar OR body:foobar
>where the format is [fieldname]:[query string]
>Of course you can use AND or OR depending on what you want to accomplish.
>
>Hope that helps.
>
>--Peter
>
>On Monday, February 11, 2002, at 04:39 PM, Charles Harvey wrote:
>
>>I have a working installation of Lucene running against indexes created
>>by a database query.
>>Each Document in the Index contains fifteen or twenty fields. I am
>>currently searching only one field (that contains concatenated database
>>columns) because I cannot figure out how to search multiple fields. So:
>>
>>How can I use Lucene to search more than one field in an Index of Documents?
>>
>>eg:
>>field CATEGORY is(or contains) 'bar'
>>AND
>>field BODY contains 'foo'
>>
>>
>>
>>
>>_________________
>>
>>"The trouble with the rat-race is that even if you win you're still a rat."
>>--Lily Tomlin
>>_________________
>>Charles Harvey
>>Developer
>>http://www.philly.com
>>Wk: 215 789 6057
>>Cell: 215 588 0851
>>
>>
>>--
>>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>

_________________

"The trouble with the rat-race is that even if you win you're still a rat."
--Lily Tomlin
_________________
Charles Harvey
Developer
http://www.philly.com
Wk: 215 789 6057
Cell: 215 588 0851


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Searching multiple fields in one Index of Documents [ In reply to ]
Charles,

See http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00176.html

Regards,
K

----- Original Message -----
From: "Charles Harvey" <charvey@knightridder.com>
To: <lucene-user@jakarta.apache.org>
Sent: Tuesday, February 12, 2002 8:39 AM
Subject: Searching multiple fields in one Index of Documents


> I have a working installation of Lucene running against indexes created by
> a database query.
> Each Document in the Index contains fifteen or twenty fields. I am
> currently searching only one field (that contains concatenated database
> columns) because I cannot figure out how to search multiple fields. So:
>
> How can I use Lucene to search more than one field in an Index of
Documents?
>
> eg:
> field CATEGORY is(or contains) 'bar'
> AND
> field BODY contains 'foo'
>
>
>
>
> _________________
>
> "The trouble with the rat-race is that even if you win you're still a
rat."
> --Lily Tomlin
> _________________
> Charles Harvey
> Developer
> http://www.philly.com
> Wk: 215 789 6057
> Cell: 215 588 0851
>
>
> --
> 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>
Re: Searching multiple fields in one Index of Documents [ In reply to ]
This is great Kelvin,
Sorry I didn't see it before.
I'll add it to the list of contributions.

--Peter

On 2/13/02 12:43 AM, "Kelvin Tan" <kelvin@relevanz.com> wrote:

> Charles,
>
> See http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00176.html
>
> Regards,
> K
>
> ----- Original Message -----
> From: "Charles Harvey" <charvey@knightridder.com>
> To: <lucene-user@jakarta.apache.org>
> Sent: Tuesday, February 12, 2002 8:39 AM
> Subject: Searching multiple fields in one Index of Documents
>
>
>> I have a working installation of Lucene running against indexes created by
>> a database query.
>> Each Document in the Index contains fifteen or twenty fields. I am
>> currently searching only one field (that contains concatenated database
>> columns) because I cannot figure out how to search multiple fields. So:
>>
>> How can I use Lucene to search more than one field in an Index of
> Documents?
>>
>> eg:
>> field CATEGORY is(or contains) 'bar'
>> AND
>> field BODY contains 'foo'
>>
>>
>>
>>
>> _________________
>>
>> "The trouble with the rat-race is that even if you win you're still a
> rat."
>> --Lily Tomlin
>> _________________
>> Charles Harvey
>> Developer
>> http://www.philly.com
>> Wk: 215 789 6057
>> Cell: 215 588 0851
>>
>>
>> --
>> 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>
Re: Searching multiple fields in one Index of Documents [ In reply to ]
Peter,

As advised, re-released under APL. :) There were some changes to QueryParser
constructors in rc3, and these are reflected here as well.

FWIW, I've also attached a javascript lib and accompanying HTML which
constructs a Lucene multi-field query using a HTML form.

Regards,
Kelvin

----- Original Message -----
From: "Peter Carlson" <carlson@bookandhammer.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Wednesday, February 13, 2002 10:56 PM
Subject: Re: Searching multiple fields in one Index of Documents


> This is great Kelvin,
> Sorry I didn't see it before.
> I'll add it to the list of contributions.
>
> --Peter
>
> On 2/13/02 12:43 AM, "Kelvin Tan" <kelvin@relevanz.com> wrote:
>
> > Charles,
> >
> > See
http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00176.html
> >
> > Regards,
> > K
> >
> > ----- Original Message -----
> > From: "Charles Harvey" <charvey@knightridder.com>
> > To: <lucene-user@jakarta.apache.org>
> > Sent: Tuesday, February 12, 2002 8:39 AM
> > Subject: Searching multiple fields in one Index of Documents
> >
> >
> >> I have a working installation of Lucene running against indexes created
by
> >> a database query.
> >> Each Document in the Index contains fifteen or twenty fields. I am
> >> currently searching only one field (that contains concatenated database
> >> columns) because I cannot figure out how to search multiple fields. So:
> >>
> >> How can I use Lucene to search more than one field in an Index of
> > Documents?
> >>
> >> eg:
> >> field CATEGORY is(or contains) 'bar'
> >> AND
> >> field BODY contains 'foo'
> >>
> >>
> >>
> >>
> >> _________________
> >>
> >> "The trouble with the rat-race is that even if you win you're still a
> > rat."
> >> --Lily Tomlin
> >> _________________
> >> Charles Harvey
> >> Developer
> >> http://www.philly.com
> >> Wk: 215 789 6057
> >> Cell: 215 588 0851
> >>
> >>
> >> --
> >> 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>
>
>
Re: Searching multiple fields in one Index of Documents [ In reply to ]
Odd, I'm positive I uploaded the HTML file with the other attachments. I've
uploaded it here anyway. http://www.relevanz.com/luceneQueryConstructor.html

HTH.

Regards,
Kelvin
----- Original Message -----
From: "Kelvin Tan" <kelvin@relevanz.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Thursday, February 14, 2002 1:32 PM
Subject: Re: Searching multiple fields in one Index of Documents


> Peter,
>
> As advised, re-released under APL. :) There were some changes to
QueryParser
> constructors in rc3, and these are reflected here as well.
>
> FWIW, I've also attached a javascript lib and accompanying HTML which
> constructs a Lucene multi-field query using a HTML form.
>
> Regards,
> Kelvin
>
> ----- Original Message -----
> From: "Peter Carlson" <carlson@bookandhammer.com>
> To: "Lucene Users List" <lucene-user@jakarta.apache.org>
> Sent: Wednesday, February 13, 2002 10:56 PM
> Subject: Re: Searching multiple fields in one Index of Documents
>
>
> > This is great Kelvin,
> > Sorry I didn't see it before.
> > I'll add it to the list of contributions.
> >
> > --Peter
> >
> > On 2/13/02 12:43 AM, "Kelvin Tan" <kelvin@relevanz.com> wrote:
> >
> > > Charles,
> > >
> > > See
> http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00176.html
> > >
> > > Regards,
> > > K
> > >
> > > ----- Original Message -----
> > > From: "Charles Harvey" <charvey@knightridder.com>
> > > To: <lucene-user@jakarta.apache.org>
> > > Sent: Tuesday, February 12, 2002 8:39 AM
> > > Subject: Searching multiple fields in one Index of Documents
> > >
> > >
> > >> I have a working installation of Lucene running against indexes
created
> by
> > >> a database query.
> > >> Each Document in the Index contains fifteen or twenty fields. I am
> > >> currently searching only one field (that contains concatenated
database
> > >> columns) because I cannot figure out how to search multiple fields.
So:
> > >>
> > >> How can I use Lucene to search more than one field in an Index of
> > > Documents?
> > >>
> > >> eg:
> > >> field CATEGORY is(or contains) 'bar'
> > >> AND
> > >> field BODY contains 'foo'
> > >>
> > >>
> > >>
> > >>
> > >> _________________
> > >>
> > >> "The trouble with the rat-race is that even if you win you're still a
> > > rat."
> > >> --Lily Tomlin
> > >> _________________
> > >> Charles Harvey
> > >> Developer
> > >> http://www.philly.com
> > >> Wk: 215 789 6057
> > >> Cell: 215 588 0851
> > >>
> > >>
> > >> --
> > >> 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>
> >
> >
>


----------------------------------------------------------------------------
----


> --
> 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>
RE: Searching multiple fields in one Index of Documents [ In reply to ]
Can you zip up those files or change the .js extension to .txt? My mail server strips out potentially harmful files.

Thanks,

Mark

-----Original Message-----
From: Kelvin Tan [mailto:kelvin@relevanz.com]
Sent: Wednesday, February 13, 2002 10:32 PM
To: Lucene Users List
Subject: Re: Searching multiple fields in one Index of Documents


Peter,

As advised, re-released under APL. :) There were some changes to QueryParser
constructors in rc3, and these are reflected here as well.

FWIW, I've also attached a javascript lib and accompanying HTML which
constructs a Lucene multi-field query using a HTML form.

Regards,
Kelvin

----- Original Message -----
From: "Peter Carlson" <carlson@bookandhammer.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Wednesday, February 13, 2002 10:56 PM
Subject: Re: Searching multiple fields in one Index of Documents


> This is great Kelvin,
> Sorry I didn't see it before.
> I'll add it to the list of contributions.
>
> --Peter
>
> On 2/13/02 12:43 AM, "Kelvin Tan" <kelvin@relevanz.com> wrote:
>
> > Charles,
> >
> > See
http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00176.html
> >
> > Regards,
> > K
> >
> > ----- Original Message -----
> > From: "Charles Harvey" <charvey@knightridder.com>
> > To: <lucene-user@jakarta.apache.org>
> > Sent: Tuesday, February 12, 2002 8:39 AM
> > Subject: Searching multiple fields in one Index of Documents
> >
> >
> >> I have a working installation of Lucene running against indexes created
by
> >> a database query.
> >> Each Document in the Index contains fifteen or twenty fields. I am
> >> currently searching only one field (that contains concatenated database
> >> columns) because I cannot figure out how to search multiple fields. So:
> >>
> >> How can I use Lucene to search more than one field in an Index of
> > Documents?
> >>
> >> eg:
> >> field CATEGORY is(or contains) 'bar'
> >> AND
> >> field BODY contains 'foo'
> >>
> >>
> >>
> >>
> >> _________________
> >>
> >> "The trouble with the rat-race is that even if you win you're still a
> > rat."
> >> --Lily Tomlin
> >> _________________
> >> Charles Harvey
> >> Developer
> >> http://www.philly.com
> >> Wk: 215 789 6057
> >> Cell: 215 588 0851
> >>
> >>
> >> --
> >> 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>
>
>

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Searching multiple fields in one Index of Documents [ In reply to ]
As requested,

http://www.relevanz.com/lucene_contrib.zip

Regards,
Kelvin
----- Original Message -----
From: "Mark Tucker" <MTucker@infoimage.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Friday, February 15, 2002 2:03 AM
Subject: RE: Searching multiple fields in one Index of Documents


Can you zip up those files or change the .js extension to .txt? My mail
server strips out potentially harmful files.

Thanks,

Mark

-----Original Message-----
From: Kelvin Tan [mailto:kelvin@relevanz.com]
Sent: Wednesday, February 13, 2002 10:32 PM
To: Lucene Users List
Subject: Re: Searching multiple fields in one Index of Documents


Peter,

As advised, re-released under APL. :) There were some changes to QueryParser
constructors in rc3, and these are reflected here as well.

FWIW, I've also attached a javascript lib and accompanying HTML which
constructs a Lucene multi-field query using a HTML form.

Regards,
Kelvin

----- Original Message -----
From: "Peter Carlson" <carlson@bookandhammer.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Wednesday, February 13, 2002 10:56 PM
Subject: Re: Searching multiple fields in one Index of Documents


> This is great Kelvin,
> Sorry I didn't see it before.
> I'll add it to the list of contributions.
>
> --Peter
>
> On 2/13/02 12:43 AM, "Kelvin Tan" <kelvin@relevanz.com> wrote:
>
> > Charles,
> >
> > See
http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00176.html
> >
> > Regards,
> > K
> >
> > ----- Original Message -----
> > From: "Charles Harvey" <charvey@knightridder.com>
> > To: <lucene-user@jakarta.apache.org>
> > Sent: Tuesday, February 12, 2002 8:39 AM
> > Subject: Searching multiple fields in one Index of Documents
> >
> >
> >> I have a working installation of Lucene running against indexes created
by
> >> a database query.
> >> Each Document in the Index contains fifteen or twenty fields. I am
> >> currently searching only one field (that contains concatenated database
> >> columns) because I cannot figure out how to search multiple fields. So:
> >>
> >> How can I use Lucene to search more than one field in an Index of
> > Documents?
> >>
> >> eg:
> >> field CATEGORY is(or contains) 'bar'
> >> AND
> >> field BODY contains 'foo'
> >>
> >>
> >>
> >>
> >> _________________
> >>
> >> "The trouble with the rat-race is that even if you win you're still a
> > rat."
> >> --Lily Tomlin
> >> _________________
> >> Charles Harvey
> >> Developer
> >> http://www.philly.com
> >> Wk: 215 789 6057
> >> Cell: 215 588 0851
> >>
> >>
> >> --
> >> 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>
>
>

--
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>