Adding support for NOT NEAR construct?

2007-10-17 Thread Dave Golombek
We've run into a situation where having NOT NEAR queries would really help. I haven't been able to find any discussion of adding this to Lucene in the past, so wanted to ask if people had any comments about it before I started trying to make the change. I've looked at NearSpansUnordered and it

Re: Adding support for NOT NEAR construct?

2007-10-17 Thread Mark Miller
Sounds like you just want a BUTNOT of a NearSpan. There is no Span support in the Lucene query language, but if there where: *:* BUTNOT NearSpan(foo, bar, 10) (or does lucene call it ANDNOT...) Dave Golombek wrote: We've run into a situation where having NOT NEAR queries would really help. I

Re: Adding support for NOT NEAR construct?

2007-10-17 Thread Paul Elschot
Dave, One can use SpanNotQuery to get NOT NEAR by using this generalized structure: SpanNot(foo, SpanNear(foo, bar, distance)) This also allows for example: SpanNot(two, SpanNear(one, three, distance)) Btw. I don't know of any query language that has this second form. AND NOT normally does

RE: Adding support for NOT NEAR construct?

2007-10-17 Thread Dave Golombek
From: Paul Elschot One can use SpanNotQuery to get NOT NEAR by using this generalized structure: SpanNot(foo, SpanNear(foo, bar, distance)) This also allows for example: SpanNot(two, SpanNear(one, three, distance)) Btw. I don't know of any query language that has this second form.