diff --git a/src/java/org/apache/lucene/search/RangeFilter.java b/src/java/org/apache/lucene/search/RangeFilter.java index 5c18ae10b36..c9e6631d7df 100644 --- a/src/java/org/apache/lucene/search/RangeFilter.java +++ b/src/java/org/apache/lucene/search/RangeFilter.java @@ -1,7 +1,5 @@ package org.apache.lucene.search; - - /** * Copyright 2004 The Apache Software Foundation * @@ -32,8 +30,8 @@ import org.apache.lucene.index.IndexReader; * field. * *

- * This code borrows heavily from {@link RangeQuery}, but implemented as a Filter - * (much like {@link DateFilter}) + * This code borrows heavily from {@link RangeQuery}, but is implemented as a Filter + * (much like {@link DateFilter}). *

*/ public class RangeFilter extends Filter { @@ -50,6 +48,9 @@ public class RangeFilter extends Filter { * @param upperTerm The upper bound on this range * @param includeLower Does this range include the lower bound? * @param includeUpper Does this range include the upper bound? + * @throws IllegalArgumentException if both terms are null or if + * lowerTerm is null and includeLower is true (similar for upperTerm + * and includeUpper) */ public RangeFilter(String fieldName, String lowerTerm, String upperTerm, boolean includeLower, boolean includeUpper) { @@ -74,16 +75,16 @@ public class RangeFilter extends Filter { } /** - * Constructs a filter for field field matching - * less than or equal to value + * Constructs a filter for field fieldName matching + * less than or equal to upperTerm. */ public static RangeFilter Less(String fieldName, String upperTerm) { return new RangeFilter(fieldName, null, upperTerm, false, true); } /** - * Constructs a filter for field field matching - * greater than or equal to lower + * Constructs a filter for field fieldName matching + * greater than or equal to lowerTerm. */ public static RangeFilter More(String fieldName, String lowerTerm) { return new RangeFilter(fieldName, lowerTerm, null, true, false);