java-user@lucene.apache.org
[Top] [All Lists]

Re: Adding support for NOT NEAR construct?

Subject: Re: Adding support for NOT NEAR construct?
From: Mark Miller
Date: Wed, 17 Oct 2007 13:12:10 -0400
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 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 seems that reversing the logic in
atMatch() would go a long way towards implementation; NearSpansOrdered is a
bit harder, depending upon the exact semantics of "NOT NEAR" that we want to
implement. For queries, I was thinking that either "foo bar"~-10  or "foo
bar"!~10 might be reasonable; the former should be pretty easy to parse.

Does this sound reasonable? Something for contrib?

Thanks,
Dave Golombek
Senior Software Engineer
Black Duck Software, Inc.

daveg@xxxxxxxxxxxxxxxxxxxxx
T +1.781.810.2079
F +1.781.891.5145
C +1.617.230.5634
http://www.blackducksoftware.com


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>