Package org.apache.lucene.search
Class MultiRangeQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.search.MultiRangeQuery
-
public abstract class MultiRangeQuery extends Query
Abstract class for range queries involving multiple ranges against physical points such asIntPointsAll ranges are logically ORed together TODO: Add capability for handling overlapping ranges at rewrite time- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMultiRangeQuery.BuilderA builder for multirange queries.static classMultiRangeQuery.RangeClauseRepresentation of a single clause in a MultiRangeQuery
-
Constructor Summary
Constructors Modifier Constructor Description protectedMultiRangeQuery(String field, int numDims, int bytesPerDim, List<MultiRangeQuery.RangeClause> rangeClauses)Expert: create a multidimensional range query with multiple connected ranges
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description WeightcreateWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)booleanequals(Object o)intgetBytesPerDim()StringgetField()intgetNumDims()inthashCode()protected abstract StringtoString(int dimension, byte[] value)Returns a string of a single value in a human-readable format for debugging.StringtoString(String field)voidvisit(QueryVisitor visitor)-
Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
-
-
-
-
Constructor Detail
-
MultiRangeQuery
protected MultiRangeQuery(String field, int numDims, int bytesPerDim, List<MultiRangeQuery.RangeClause> rangeClauses)
Expert: create a multidimensional range query with multiple connected ranges- Parameters:
field- field name. must not benull.rangeClauses- Range Clauses for this querynumDims- number of dimensions.
-
-
Method Detail
-
visit
public void visit(QueryVisitor visitor)
-
createWeight
public final Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
- Overrides:
createWeightin classQuery- Throws:
IOException
-
getField
public String getField()
-
getNumDims
public int getNumDims()
-
getBytesPerDim
public int getBytesPerDim()
-
toString
protected abstract String toString(int dimension, byte[] value)
Returns a string of a single value in a human-readable format for debugging. This is used byQuery.toString().- Parameters:
dimension- dimension of the particular valuevalue- single value, never null- Returns:
- human readable value for debugging
-
-