org.apache.lucene.search

Class ConstantScoreRangeQuery

public class ConstantScoreRangeQuery extends Query

A range query that returns a constant score equal to it's 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.)

Version: $Id$

Author: yonik

Constructor Summary
ConstantScoreRangeQuery(String fieldName, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)
Method Summary
booleanequals(Object o)
Returns true if o is equal to this.
StringgetField()
Returns the field name for this query
StringgetLowerVal()
Returns the value of the lower endpoint of this range query, null if open ended
StringgetUpperVal()
Returns the value of the upper endpoint of this range query, null if open ended
inthashCode()
Returns a hash code value for this object.
booleanincludesLower()
Returns true if the lower endpoint is inclusive
booleanincludesUpper()
Returns true if the upper endpoint is inclusive
Queryrewrite(IndexReader reader)
StringtoString(String field)
Prints a user-readable version of this query.

Constructor Detail

ConstantScoreRangeQuery

public ConstantScoreRangeQuery(String fieldName, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)

Method Detail

equals

public boolean equals(Object o)
Returns true if o is equal to this.

getField

public String getField()
Returns the field name for this query

getLowerVal

public String getLowerVal()
Returns the value of the lower endpoint of this range query, null if open ended

getUpperVal

public String getUpperVal()
Returns the value of the upper endpoint of this range query, null if open ended

hashCode

public int hashCode()
Returns a hash code value for this object.

includesLower

public boolean includesLower()
Returns true if the lower endpoint is inclusive

includesUpper

public boolean includesUpper()
Returns true if the upper endpoint is inclusive

rewrite

public Query rewrite(IndexReader reader)

toString

public String toString(String field)
Prints a user-readable version of this query.
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.