|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.lucene.search.Filter
org.apache.lucene.search.RangeFilter
A Filter that restricts search results to a range of values in a given field.
This code borrows heavily from RangeQuery, but is implemented as a Filter
(much like DateFilter).
| Constructor Summary | |
RangeFilter(java.lang.String fieldName,
java.lang.String lowerTerm,
java.lang.String upperTerm,
boolean includeLower,
boolean includeUpper)
|
|
| Method Summary | |
java.util.BitSet |
bits(IndexReader reader)
Returns a BitSet with true for documents which should be permitted in search results, and false for those that should not. |
boolean |
equals(java.lang.Object o)
Returns true if o is equal to this. |
int |
hashCode()
Returns a hash code value for this object. |
static RangeFilter |
Less(java.lang.String fieldName,
java.lang.String upperTerm)
Constructs a filter for field fieldName matching
less than or equal to upperTerm. |
static RangeFilter |
More(java.lang.String fieldName,
java.lang.String lowerTerm)
Constructs a filter for field fieldName matching
greater than or equal to lowerTerm. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RangeFilter(java.lang.String fieldName,
java.lang.String lowerTerm,
java.lang.String upperTerm,
boolean includeLower,
boolean includeUpper)
fieldName - The field this range applies tolowerTerm - The lower bound on this rangeupperTerm - The upper bound on this rangeincludeLower - Does this range include the lower bound?includeUpper - Does this range include the upper bound?
java.lang.IllegalArgumentException - if both terms are null or if
lowerTerm is null and includeLower is true (similar for upperTerm
and includeUpper)| Method Detail |
public static RangeFilter Less(java.lang.String fieldName,
java.lang.String upperTerm)
fieldName matching
less than or equal to upperTerm.
public static RangeFilter More(java.lang.String fieldName,
java.lang.String lowerTerm)
fieldName matching
greater than or equal to lowerTerm.
public java.util.BitSet bits(IndexReader reader)
throws java.io.IOException
bits in class Filterjava.io.IOExceptionpublic java.lang.String toString()
public boolean equals(java.lang.Object o)
o is equal to this.
public int hashCode()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||