lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bernard <emman...@hibernate.org>
Subject PhraseQuery vs MultiPhraseQuery
Date Fri, 28 May 2010 14:15:25 GMT
Hello,
I am a bit confused by the two.

Is there a fundamental difference between

PhraseQuery query = new PhraseQuery();
query.add(term1, 0);
query.add(term2, 0);

and

MultiPhraseQuery query = new MultiPhraseQuery();
query.add( new Term[] { term1, term2 } );

The only different I could think of is that MPQ somehow does a OR between terms at the same
position while PQ does a AND. Am I off base?

Thanks for you help.

Emmanuel


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


Mime
View raw message