Yes, I understood what you said. What I meant is, since i am using Lucene
2.1, I don't get the parse exception. So I thought it's working just like
using quotes.

Thanks,
Sonu

On 9/21/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:
>
>
> : 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to