lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Empty fields ...
Date Thu, 20 Jul 2006 07:25:51 GMT

: Thanks much for that clarification, it helps a lot. The original request was
: to find docs wthat were NOT NULL, so  I'm glad I'm not the only one who

: But with your RangeFilter comment, that seems unnecessary. You can use a
: RangeFilter with null, null as bounds, then just flip the bits in the
: resulting bitset, right? Or, for that matter, if you know a-priori the

now maybe i'm confused again :) ... a RangeFilter *must* be given a
fieldName, but the lowerTerm/upperTerm params can be null -- if they are both
null, then the filter matches on all docs that have any value for that
field -- not on docs that have a "null value" for that field (because
there is no concept of "null" in Lucene -- just the idea of not having a
value.   So if you construct the RangeFilter as you describe, and flip the
bits, you'll get docs that *don't* have a value, which sounds like the
opposite of what you wnat, so don't flip the bits :)

: minimum and maximum possible values for a field, just make the RangeFilter
: with those values and it's all done in one line of code. So somebody else

right: if you know in advance the max/min values for a given field,
specifying them in the RangeFilter constructor is the same as specifying

The JUnit test code for RangeFilter should make this a lot clearer then i
can in my imprefect prose.


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

View raw message