lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/search DateFilter.java
Date Tue, 07 May 2002 21:26:34 GMT
otis        02/05/07 14:26:34

  Modified:    src/java/org/apache/lucene/search DateFilter.java
  Log:
  - Applied a patch supplied by David Smiley that ensures that searches that
    use DateFilter don't throw an exception when no matches are found.
  
  Revision  Changes    Path
  1.4       +3 -0      jakarta-lucene/src/java/org/apache/lucene/search/DateFilter.java
  
  Index: DateFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/DateFilter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DateFilter.java	10 Apr 2002 02:57:08 -0000	1.3
  +++ DateFilter.java	7 May 2002 21:26:34 -0000	1.4
  @@ -130,6 +130,9 @@
       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) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message