: I checked the lucene converted syntax (using Query.toString()) in both case
: and found the second one actually not converting to proximity query.
I don't think you understood what I was trying to say...
using parens with a "~" character after it is not currently, and has never
been (to my knowledge) a means of creating a "proximity query". It is not
documented in 2.2, 2.1, 2.0, 1.9, or 1.4.3. It is not legal syntax in 2.2
(it causes a parse exception). In lucene, the way to do proximity based
queries is either with SpanNearQueries, or with PhraseQueries -- the way
to create a PhraseQuery using hte Lucene QueryParser is with quote
character '"'
there is no reason why you should expect: (cat dog)~3 to create a
proximity query.
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org