public class RangeQuery extends org.apache.lucene.search.Query implements Transformable
org.apache.lucene.search.RangeQuery.
 This class does not rewrite to basic TermQuery
 but will calculate the matching documents itself. That way a
 TooManyClauses can be avoided.TRANSFORM_LOWER_CASE, TRANSFORM_NONE, TRANSFORM_UPPER_CASE| Constructor and Description | 
|---|
| RangeQuery(org.apache.lucene.index.Term lowerTerm,
          org.apache.lucene.index.Term upperTerm,
          boolean inclusive,
          int transform,
          org.apache.jackrabbit.core.query.lucene.PerQueryCache cache)Creates a new RangeQuery. | 
| RangeQuery(org.apache.lucene.index.Term lowerTerm,
          org.apache.lucene.index.Term upperTerm,
          boolean inclusive,
          org.apache.jackrabbit.core.query.lucene.PerQueryCache cache)Creates a new RangeQuery. | 
| Modifier and Type | Method and Description | 
|---|---|
| org.apache.lucene.search.Weight | createWeight(org.apache.lucene.search.Searcher searcher)Creates the  Weightfor this query. | 
| void | extractTerms(Set<org.apache.lucene.index.Term> 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. | 
public RangeQuery(org.apache.lucene.index.Term lowerTerm,
          org.apache.lucene.index.Term upperTerm,
          boolean inclusive,
          org.apache.jackrabbit.core.query.lucene.PerQueryCache cache)
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,
          org.apache.jackrabbit.core.query.lucene.PerQueryCache cache)
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.public void setTransformation(int transformation)
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.public 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<org.apache.lucene.index.Term> terms)
extractTerms in class org.apache.lucene.search.QueryCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.