- Applied a patch supplied by David Smiley that ensures that searches that

use DateFilter don't throw an exception when no matches are found.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149741 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Otis Gospodnetic 2002-05-07 21:26:34 +00:00
parent 0c5a8aa81b
commit 7cb408e964
1 changed files with 3 additions and 0 deletions

View File

@ -130,6 +130,9 @@ public final class DateFilter extends Filter {
BitSet bits = new BitSet(reader.maxDoc());
TermEnum enum = reader.terms(new Term(field, start));
TermDocs termDocs = reader.termDocs();
if (enum.term() == null)
return bits;
try {
Term stop = new Term(field, end);
while (enum.term().compareTo(stop) <= 0) {