lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: question
Date Mon, 16 Jan 2017 17:45:38 GMT
"it depends". I'm assuming that your case 1 is intended to be phrase
searches whereas case 2 is just boolean (and specifically AND is the

So, within 1 (assuming phrase queries) the results should NOT be the
same, that is "sas institute" (as a phrase) should not return the same
results as "institute sas", _unless_ a "slop factor" has been
specified, which may be internally applied. "slop" (or, under the
covers, Span queries) allow out-of-order phrases.

I would expect the two queries in 2 to return the same results.

whether you should get the same results from 1 as 2 depends on several things:
a> whether the default operator is AND
b> whether the phrase queries specify a slop
c> whether other words are in between, e.g. "institute something something sas"

Perhaps the best way to see what's going on would be to turn on
highlighting and see if the returned documents make sense.


On Mon, Jan 16, 2017 at 7:48 AM, Julius Kravjar
<> wrote:
> May I have one question? One company - we used their sw - talked to us that
> in Lucene it is normal that the search results for
> 1.
> "sas institute"
> "institute sas"
> are the same.
> 2.
> sas institute
> institute sas
> are the same
> 3.
> the number of searches of "sas institute" is smaller then sas institute
> (analogically "institute sas" is smaller then institute sas
> Should we believe them? Manythanks in advance.
> Best regards
> J. Kravjar

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

View raw message