Re: Empty fields ...

2006-07-20 Thread Erick Erickson
What? You actually want me to put forth some effort? That's crazy talk .. Thanks, I think I've got it now. Best Erick

Re: Empty fields ...

2006-07-20 Thread Chris Hostetter
: 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 t

Re: Empty fields ...

2006-07-19 Thread Erick Erickson
Chris: 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 remembers things...er...incongruently with reality About empty values for a field. That'll teach me to try to remember without looking

Re: Empty fields ...

2006-07-19 Thread Chris Hostetter
: Zip IS NOT NULL : : why invert the bitset? i think the orriginal request was to find all docs where the field did *not* have any value ... or in your vernacular: where Zip IS NULL : a token containing the empty string matches documents that : > contain that token : > : : Isn't this exactly what

Re: Empty fields ...

2006-07-19 Thread Erick Erickson
Ok, I'm confused again, not unusual To create a bitset for the following condition Zip IS NOT NULL why invert the bitset? a token containing the empty string matches documents that contain that token Isn't this exactly what he wants? Or am I mis-reading this? I'm reading it as "any do

Re: Empty fields ...

2006-07-19 Thread Chris Hostetter
: TermDocs termDocs = reader.termDocs(); : termDocs.seek(new Term("", "")); : while (termDocs.next()) { : bits.set(termDocs.doc()); : } : : I *think* (and I'm remembering things folks wrote, haven't done this myself) : that the empty string for the Term matches all terms. If not, you m

Re: Empty fields ...

2006-07-19 Thread Dragon Fly
Thank you very much. From: "Erick Erickson" <[EMAIL PROTECTED]> Reply-To: java-user@lucene.apache.org To: java-user@lucene.apache.org Subject: Re: Empty fields ... Date: Wed, 19 Jul 2006 09:48:04 -0400 Try something like TermDocs termDocs = reader.termDocs(); termDo

Re: Empty fields ...

2006-07-19 Thread Erick Erickson
Try something like TermDocs termDocs = reader.termDocs(); termDocs.seek(new Term("", "")); while (termDocs.next()) { bits.set(termDocs.doc()); } I *think* (and I'm remembering things folks wrote, haven't done this myself) that the empty string for the Term matches all terms. If not, y

Re: Empty fields ...

2006-07-19 Thread Dragon Fly
? termDocs()??? Thank you. From: "Erick Erickson" <[EMAIL PROTECTED]> Reply-To: java-user@lucene.apache.org To: java-user@lucene.apache.org Subject: Re: Empty fields ... Date: Tue, 18 Jul 2006 13:08:53 -0400 Quoting the guys "it depends" ... At root, a filter is a bitset. S

Re: Empty fields ...

2006-07-18 Thread Erick Erickson
Quoting the guys "it depends" ... At root, a filter is a bitset. So size-wise, you are using 1 bit/doc (plus some small overhead). Both the storage required and the time to construct are dependent on the characteristics of your corpus. I guess the only way you can answer that for your particular

Re: Empty fields ...

2006-07-18 Thread Dragon Fly
AIL PROTECTED]> Reply-To: java-user@lucene.apache.org To: java-user@lucene.apache.org Subject: Re: Empty fields ... Date: Tue, 18 Jul 2006 10:41:28 -0400 You could use a filter. You'd just construct a filter with the bits on for all docs that had that term. You could cache these to make futur

Re: Empty fields ...

2006-07-18 Thread Erick Erickson
You could use a filter. You'd just construct a filter with the bits on for all docs that had that term. You could cache these to make future searchers easier. I envision, say, caching one filter for each field and keeping them around so you could re-use them whenever you wanted. See ConstantScore