lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bernard <>
Subject PhraseQuery vs MultiPhraseQuery
Date Fri, 28 May 2010 14:15:25 GMT
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);


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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message