lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sachin Kulkarni <>
Subject Re: What is the difference between PhraseQuery and BooleanQuery with BooleanClause.Occur.SHOULD
Date Fri, 01 Apr 2016 11:54:56 GMT
I got the answer.
Somehow I missed it.
The PhraseQuery requires the terms to be in a fixed order whereas the
BooleanQuery does not require the terms to be
in a particular order.

On Thu, Mar 31, 2016 at 3:07 PM, Sachin Kulkarni <>

> Hi,
> I am using Lucene-5.0.0.
> If I had a qurey "New York" and if I use the BooleanQuery with the
> BooleanClause set to MUST on the two terms, is it the same as dong a
> PhraseQuery with the two terms?
> I am doing some 2-gram type queries and they are giving me different
> results with these two methods. I am trying to understand why is the
> difference.
> Thank you.
> Regards,
> Sachin

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