lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Diviacco <patrick.divia...@gmail.com>
Subject Building a query of single terms...
Date Mon, 21 Mar 2011 17:43:26 GMT
I'm new to Lucene and I would like to know what's the difference (if there
is any) between

PhraseQuery.add(Term1)
PhraseQuery.add(Term2)
PhraseQuery.add(Term3)

and

term1 = new TermQuery(new Term(...));
booleanQuery.add(term1, BooleanClause.Occur.SHOULD);

term2 = new TermQuery(new Term(...));
booleanQuery.add(term2, BooleanClause.Occur.SHOULD);

thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message