lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Empty fields ...
Date Wed, 19 Jul 2006 16:21:54 GMT

: TermDocs         termDocs = reader.termDocs();
: termDocs.seek(new Term("<relevant field name here>", ""));
: 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 might have

not quite ... a token containing the empty string matches documents that
contain that token -- not common for simple indexes, but it has it's uses.

what you want to do is create a bitset for every document that has a value
in that field, and then invert the BitSet.





-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message