org.apache.lucene.search
Class RangeQuery
- Cloneable, java.io.Serializable
A Query that matches documents within an exclusive range.
Version:
- Serialized Form
RangeQuery(Term lowerTerm, Term upperTerm, boolean inclusive) - Constructs a query selecting all terms greater than
lowerTerm but less than upperTerm .
|
clone , combine , createWeight , getBoost , getSimilarity , mergeBooleanQueries , rewrite , setBoost , toString , toString , weight |
RangeQuery
public RangeQuery(Term lowerTerm,
Term upperTerm,
boolean inclusive)
Constructs a query selecting all terms greater than
lowerTerm
but less than upperTerm
.
There must be at least one term and either term may be null,
in which case there is no bound on that side, but if there are
two terms, both terms must be for the same field.
getField
public String getField()
Returns the field name for this query
getLowerTerm
public Term getLowerTerm()
Returns the lower term of this range query
getUpperTerm
public Term getUpperTerm()
Returns the upper term of this range query
isInclusive
public boolean isInclusive()
Returns true
if the range query is inclusive
rewrite
public Query rewrite(IndexReader reader)
throws IOException
FIXME: Describe rewrite
method here.
- rewrite in interface Query
reader
- an IndexReader
value
- a
Query
value
toString
public String toString(String field)
Prints a user-readable version of this query.
- toString in interface Query
Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.