lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sonu SR" <son...@gmail.com>
Subject Re: Question regarding proximity search
Date Fri, 21 Sep 2007 13:14:50 GMT
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 <hossman_lucene@fucit.org> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message