Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.search
Class ConstantScoreRangeQuery

    java.lang.Object
      org.apache.lucene.search.Query
          org.apache.lucene.search.ConstantScoreRangeQuery

All Implemented Interfaces:
  Serializable, 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.)

Version:
  $Id: ConstantScoreRangeQuery.java 564236 2007-08-09 15:21:19Z gsingers $
See Also:
  Serialized Form

Constructor Summary
`ConstantScoreRangeQuery(String fieldName, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)`

Method Summary
`boolean` | `equals(Object o)` Returns true if `o` is equal to this.
`String` | `getField()` Returns the field name for this query
`String` | `getLowerVal()` Returns the value of the lower endpoint of this range query, null if open ended
`String` | `getUpperVal()` Returns the value of the upper endpoint of this range query, null if open ended
`int` | `hashCode()` Returns a hash code value for this object.
`boolean` | `includesLower()` Returns `true` if the lower endpoint is inclusive
`boolean` | `includesUpper()` Returns `true` if the upper endpoint is inclusive
`Query` | `rewrite(IndexReader reader)` Expert: called to re-write queries into primitive queries.
`String` | `toString(String field)` Prints a user-readable version of this query.

Methods inherited from class org.apache.lucene.search.Query
`clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ConstantScoreRangeQuery

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

Method Detail

### 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

### 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)
                  throws IOException

  Description copied from class: `Query`
  Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

  Overrides:
    `rewrite` in class `Query`
  Throws:
    `IOException`

### toString

    public String toString(String field)

  Prints a user-readable version of this query.

  Specified by:
    `toString` in class `Query`

### equals

    public boolean equals(Object o)

  Returns true if `o` is equal to this.

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Returns a hash code value for this object.

  Overrides:
    `hashCode` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.