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 Patrick Burleson <pb...@gmail.com> on 2004/08/11 20:30:35 UTC

Searching without a specified field

I would like to build a search that takes a string and parses it, then
uses that string to search all fields available in the index. Is that
possible without building up a huge boolean query of all my fields? I
may not know the field names at runtime.

Thanks,
Patrick

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


Re: Searching without a specified field

Posted by Patrick Burleson <pb...@gmail.com>.
Erik,

Thank you for the fast response. After reading through the FAQ and
JavaDoc, it appears that it what I really want to do.

Patrick

On Wed, 11 Aug 2004 15:08:03 -0400, Erik Hatcher
<er...@ehatchersolutions.com> wrote:
> I suggest you aggregate all the text you want searchable into a single
> field during indexing.  Then search that field at query time instead.
> 
> The alternative is to build up a (potentially huge) BooleanQuery using
> that string for each field.  The MultiFieldQueryParser can do this, but
> its not pretty and I'm not fond of it.
> 
>         Erik
> 
> 
> 
> On Aug 11, 2004, at 2:30 PM, Patrick Burleson wrote:
> 
> > I would like to build a search that takes a string and parses it, then
> > uses that string to search all fields available in the index. Is that
> > possible without building up a huge boolean query of all my fields? I
> > may not know the field names at runtime.
> >
> > Thanks,
> > Patrick
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
>

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


Re: Searching without a specified field

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
I suggest you aggregate all the text you want searchable into a single 
field during indexing.  Then search that field at query time instead.

The alternative is to build up a (potentially huge) BooleanQuery using 
that string for each field.  The MultiFieldQueryParser can do this, but 
its not pretty and I'm not fond of it.

	Erik

On Aug 11, 2004, at 2:30 PM, Patrick Burleson wrote:

> I would like to build a search that takes a string and parses it, then
> uses that string to search all fields available in the index. Is that
> possible without building up a huge boolean query of all my fields? I
> may not know the field names at runtime.
>
> Thanks,
> Patrick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


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