Yes, order does matter. When order is changed as in your example, matching the text "foo always bar" would require one more move for "bar foo" than for "foo bar" Lucene In Action has some nice graphics explaining this....
Best, Erick On Fri, May 13, 2011 at 6:13 AM, Tor Henning Ueland <tor.henn...@gmail.com> wrote: > Hi, > > The documentation does not(?) specify this, but still a interesting question. > Does the order of the words in a proximity search matter? And if it > does, is it possible to ignore the order? > > I did not belive it did, but some tests against a ngram field does > give different results. > > Examples: > "foo bar"~99 - 10 hits > "bar foo"~99 - 11 hits > > -- > Best regards > Tor Henning Ueland >