|
||||||||||
| 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.jackrabbit.core.query.lucene.RangeQuery
public class RangeQuery
Implements a variant of the lucene class RangeQuery.
This class does not rewrite to basic TermQuery
but will calculate the matching documents itself. That way a
TooManyClauses can be avoided.
| Field Summary |
|---|
| Fields inherited from interface org.apache.jackrabbit.core.query.lucene.TransformConstants |
|---|
TRANSFORM_LOWER_CASE, TRANSFORM_NONE, TRANSFORM_UPPER_CASE |
| Constructor Summary | |
|---|---|
RangeQuery(org.apache.lucene.index.Term lowerTerm,
org.apache.lucene.index.Term upperTerm,
boolean inclusive)
Creates a new RangeQuery. |
|
RangeQuery(org.apache.lucene.index.Term lowerTerm,
org.apache.lucene.index.Term upperTerm,
boolean inclusive,
int transform)
Creates a new RangeQuery. |
|
| Method Summary | |
|---|---|
protected org.apache.lucene.search.Weight |
createWeight(org.apache.lucene.search.Searcher searcher)
Creates the Weight for this query. |
void |
extractTerms(Set terms)
|
org.apache.lucene.search.Query |
rewrite(org.apache.lucene.index.IndexReader reader)
Tries to rewrite this query into a standard lucene RangeQuery. |
void |
setTransformation(int transformation)
Sets the transformation. |
String |
toString(String field)
Returns a string representation of this query. |
| Methods inherited from class org.apache.lucene.search.Query |
|---|
clone, combine, 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(org.apache.lucene.index.Term lowerTerm,
org.apache.lucene.index.Term upperTerm,
boolean inclusive)
null, but not both!
lowerTerm - the lower term of the interval, or nullupperTerm - the upper term of the interval, or null.inclusive - if true the interval is inclusive.
public RangeQuery(org.apache.lucene.index.Term lowerTerm,
org.apache.lucene.index.Term upperTerm,
boolean inclusive,
int transform)
null, but not both!
lowerTerm - the lower term of the interval, or nullupperTerm - the upper term of the interval, or null.inclusive - if true the interval is inclusive.transform - how term enums are transformed when read from the index.| Method Detail |
|---|
public void setTransformation(int transformation)
TransformConstants.TRANSFORM_LOWER_CASETransformConstants.TRANSFORM_NONETransformConstants.TRANSFORM_UPPER_CASE
setTransformation in interface Transformabletransformation - a transform constant.
public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader)
throws IOException
rewrite in class org.apache.lucene.search.Queryreader - the index reader.
IOException - if an error occurs.protected org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.Searcher searcher)
Weight for this query.
createWeight in class org.apache.lucene.search.Querysearcher - the searcher to use for the Weight.
Weigth for this query.public String toString(String field)
toString in class org.apache.lucene.search.Queryfield - the field name for which to create a string representation.
public void extractTerms(Set terms)
extractTerms in class org.apache.lucene.search.Query
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||