Mailing List Archive

Searching all the fields
If I want to search a word in all my fields, can I do it passing the String field like a null to a QueryParser ? If I can´t do it this way, what must I do ?
__________________________
David Bonilla Fuertes
THE BIT BANG NETWORK
http://www.bit-bang.com
Profesor Waksman, 8, 6º B
28036 Madrid
SPAIN
Tel.: (+34) 914 577 747
Móvil: 656 62 83 92
Fax: (+34) 914 586 176
__________________________
Re: Searching all the fields [ In reply to ]
You can't do it that way. One way is to gather all the fields
you want to search across into one big field called "contents"
or something. That is in the FAQ at
http://www.lucene.com/cgi-bin/faq/faqmanager.cgi?file=chapter.search&toc=faq#q12
and is the way I do it.

A few days ago someone posted some code that, I think, took a term
and prefixed it with assorted different field names. If my
recollection is correct that might be another way.



--
Ian.
ian.lea@blackwell.co.uk


David Bonilla wrote:
>
> If I want to search a word in all my fields, can I do it passing the String field like a null to a QueryParser ? If I can´t do it this way, what must I do ?
> __________________________
> David Bonilla Fuertes
> THE BIT BANG NETWORK
> http://www.bit-bang.com

--
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 all the fields [ In reply to ]
Yep, I posted the code on Tuesday. It's somewhat more flexible than the
method suggested in the FAQ.

It's not in the mail-archives yet, so if you want it just drop me an email.

Regards,
Kelvin

----- Original Message -----
From: Ian Lea <ian.lea@blackwell.co.uk>
To: Lucene Users List <lucene-user@jakarta.apache.org>
Sent: Wednesday, November 14, 2001 9:11 PM
Subject: Re: Searching all the fields


> You can't do it that way. One way is to gather all the fields
> you want to search across into one big field called "contents"
> or something. That is in the FAQ at
>
http://www.lucene.com/cgi-bin/faq/faqmanager.cgi?file=chapter.search&toc=faq
#q12
> and is the way I do it.
>
> A few days ago someone posted some code that, I think, took a term
> and prefixed it with assorted different field names. If my
> recollection is correct that might be another way.
>
>
>
> --
> Ian.
> ian.lea@blackwell.co.uk
>
>
> David Bonilla wrote:
> >
> > If I want to search a word in all my fields, can I do it passing the
String field like a null to a QueryParser ? If I can´t do it this way, what
must I do ?
> > __________________________
> > David Bonilla Fuertes
> > THE BIT BANG NETWORK
> > http://www.bit-bang.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>