org.apache.lucene.search
Class ConstantScoreRangeQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.search.ConstantScoreRangeQuery
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class ConstantScoreRangeQuery extends Query
A range query that returns a constant score equal to its boost for all documents in the range.It does not have an upper bound on the number of clauses covered in the range.
If an endpoint is null, it is said to be "open". Either or both endpoints may be open. Open endpoints may not be exclusive (you can't select all but the first or last term without explicitly specifying the term to exclude.)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ConstantScoreRangeQuery(java.lang.String fieldName, java.lang.String lowerVal, java.lang.String upperVal, boolean includeLower, boolean includeUpper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)Returns true ifois equal to this.java.lang.StringgetField()Returns the field name for this queryjava.lang.StringgetLowerVal()Returns the value of the lower endpoint of this range query, null if open endedjava.lang.StringgetUpperVal()Returns the value of the upper endpoint of this range query, null if open endedinthashCode()Returns a hash code value for this object.booleanincludesLower()Returnstrueif the lower endpoint is inclusivebooleanincludesUpper()Returnstrueif the upper endpoint is inclusiveQueryrewrite(IndexReader reader)Expert: called to re-write queries into primitive queries.java.lang.StringtoString(java.lang.String field)Prints a user-readable version of this query.-
Methods inherited from class org.apache.lucene.search.Query
clone, combine, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
-
-
-
-
Constructor Detail
-
ConstantScoreRangeQuery
public ConstantScoreRangeQuery(java.lang.String fieldName, java.lang.String lowerVal, java.lang.String upperVal, boolean includeLower, boolean includeUpper)
-
-
Method Detail
-
getField
public java.lang.String getField()
Returns the field name for this query
-
getLowerVal
public java.lang.String getLowerVal()
Returns the value of the lower endpoint of this range query, null if open ended
-
getUpperVal
public java.lang.String getUpperVal()
Returns the value of the upper endpoint of this range query, null if open ended
-
includesLower
public boolean includesLower()
Returnstrueif the lower endpoint is inclusive
-
includesUpper
public boolean includesUpper()
Returnstrueif the upper endpoint is inclusive
-
rewrite
public Query rewrite(IndexReader reader) throws java.io.IOException
Description copied from class:QueryExpert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.
-
toString
public java.lang.String toString(java.lang.String field)
Prints a user-readable version of this query.
-
equals
public boolean equals(java.lang.Object o)
Returns true ifois equal to this.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Returns a hash code value for this object.- Overrides:
hashCodein classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG