You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Clemens Wyss <cl...@mysign.ch> on 2011/03/02 16:31:06 UTC

Searching within all fields...

looking at the Term and QueryParser class, I always have to provide a field name. MultiFieldQueryParser requires a list of fields. But what if I just want to search withing "all fields", not enumerating them?

Any advices?

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Searching within all fields...

Posted by Ian Lea <ia...@gmail.com>.
A common alternative is to create a catch all field called something
like "contents" and dump all searchable data in there, instead of or
as well as in individual fields, depending on your requirements.

There is no out-of-the-box way to automatically search across all fields.


--
Ian.

On Wed, Mar 2, 2011 at 3:31 PM, Clemens Wyss <cl...@mysign.ch> wrote:
> looking at the Term and QueryParser class, I always have to provide a field name. MultiFieldQueryParser requires a list of fields. But what if I just want to search withing "all fields", not enumerating them?
>
> Any advices?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org