mirror of https://github.com/apache/lucene.git
- 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:
parent
0c5a8aa81b
commit
7cb408e964
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue