|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.search.Query
org.apache.lucene.search.RangeQuery
public class RangeQuery
A Query that matches documents within an exclusive range.
Constructor Summary | |
---|---|
RangeQuery(Term lowerTerm,
Term upperTerm,
boolean inclusive)
Constructs a query selecting all terms greater than lowerTerm but less than upperTerm . |
Method Summary | |
---|---|
Query |
combine(Query[] queries)
Expert: called when re-writing queries under MultiSearcher. |
java.lang.String |
getField()
Returns the field name for this query |
Term |
getLowerTerm()
Returns the lower term of this range query |
Term |
getUpperTerm()
Returns the upper term of this range query |
boolean |
isInclusive()
Returns true if the range query is inclusive |
Query |
rewrite(IndexReader reader)
FIXME: Describe rewrite method here. |
java.lang.String |
toString(java.lang.String field)
Prints a user-readable version of this query. |
Methods inherited from class org.apache.lucene.search.Query |
---|
clone, createWeight, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RangeQuery(Term lowerTerm, Term upperTerm, boolean inclusive)
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.
Method Detail |
---|
public Query rewrite(IndexReader reader) throws java.io.IOException
rewrite
method here.
rewrite
in class Query
reader
- an IndexReader
value
Query
value
java.io.IOException
- if an error occurspublic Query combine(Query[] queries)
Query
Only implemented by derived queries, with no
Query.createWeight(Searcher)
implementatation.
combine
in class Query
public java.lang.String getField()
public Term getLowerTerm()
public Term getUpperTerm()
public boolean isInclusive()
true
if the range query is inclusive
public java.lang.String toString(java.lang.String field)
toString
in class Query
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |