Hi guys,
I've had this code for some time but am just now questioning if it works.
I have a custom filter that i've been using since Lucene 1.4 to Lucene 2.2.0 and it essentially
builds up a BitSet like so:
for ( int x = 0; x < fields.length; x++ ) {
for ( int y = 0; y < values.length; y++ ) {
TermDocs termDocs = reader.termDocs( new Term( fields[x], values[y] ) );
try {
while ( termDocs.next() ) {
int doc = termDocs.doc();
bits.set( doc );
}
}
finally {
termDocs.close();
}
}
}
I notice that it grabs all the TermDocs for the first field and value but nothing after that.
But I do know that the other values exist but I don't get any TermDocs afterwards.
Do I need to reopen the IndexReader each time?
Regards,
Roy
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
|