lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Subset match query?
Date Wed, 03 Oct 2007 21:34:56 GMT

: I understand how that recommendation could potentially cover fields with
: undesired terms mixed in with the desired terms.  I fail to see that it
: covers the case where the undesired term(s) are last, i.e. "desired desired
: undesired."  Could you please elaborate?  Thanks!

my bad ... you are correct, there would be a false positive in that case.  
"out of the box" i think you would have index a marker token at the end of 
hte field and include it in your SpanNear.

in general, even if you were going to write a custom query, the lucene 
index structure makes it very easy/fast to find matches on specific 
tokens, but finding the absence of something (A not followed by anything, 
or a purely negative boolean query) doesn't fit with the way things are 
set up -- so workarrounds have to be found ... using a MatchAllDocsQuery
works well when dealing with purely negative queries, using a marker term 
to denote the end of a value works well in this case.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message