Hello ctorresl,
you can use QueryParser automatically creating query as query syntax (Erick
showed).
Or use BooleanQuery class.
BooleanQuery query = new BooleanQuery;
query.add(a_termquery, Occur.SHOULD);
query.add(other_termquery, Occur.SHOULD);


On Thu, Jan 28, 2010 at 11:15 AM, Erick Erickson <erickerick...@gmail.com>wrote:

> Have you looked at the query syntax?
>
> See...
> http://lucene.apache.org/java/3_0_0/queryparsersyntax.html
>
> And the book Lucene In Action has many examples....
>
> HTH
> Erick
>
>
> On Wed, Jan 27, 2010 at 6:55 PM, ctorresl <ctorr...@facinf.uho.edu.cu
> >wrote:
>
> >
> > Hello:
> > IÄm working with Lucene for my thesis, please I need answers to
> > these questions:
> > 1. How can I tell Lucene to search for more than one term??? (for
> example:
> > the query "house garden computer" will return documents in which at least
> > one of the
> > term appears) What classes I need to use?
> > 2. Lucene works well in Windows, Mac OS X, Linux y Unix??? what other
> > platform?
> >
> > Thanks in advanced,
> > Carmen
> > --
> > View this message in context:
> >
> http://old.nabble.com/Search-for-more-than-one-term-tp27348933p27348933.html
> > Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> > For additional commands, e-mail: java-user-h...@lucene.apache.org
> >
> >
>

Reply via email to