Thanks Hoss, for the reply. I am using Lucene 2.1. I checked the lucene converted syntax (using Query.toString()) in both case and found the second one actually not converting to proximity query.
"cat dog"~6 is converted to ABST:"cat dog"~4 and (cat dog)~6 is converted to +ABST:cat +ABST:dog. That is discarding the proximity operator in the second case. On 9/21/07, Chris Hostetter <[EMAIL PROTECTED]> wrote: > > > : Is the query "cat dog"~6 same as (cat dog)~6 ? > : I think both case will search for "cat" and "dog" within 6 words each > other. > : But I am getting different number of results for the above queries. The > : second one may be the higher. Please clarify this. > > i don't believe: (cat dog)~6 is even a legal query in the Lucene > QueryParser sytnax ... it isn't documented, and it doesn't work in Lucene > 2.2. > > > > -Hoss > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >