org.apache.lucene.search
Class ConstantScoreRangeQuery

java.lang.Object
  extended by org.apache.lucene.search.Query
      extended by org.apache.lucene.search.MultiTermQuery
          extended by org.apache.lucene.search.TermRangeQuery
              extended by org.apache.lucene.search.ConstantScoreRangeQuery
All Implemented Interfaces:
Serializable, Cloneable

Deprecated. Use TermRangeQuery for term ranges or NumericRangeQuery for numeric ranges instead. This class will be removed in Lucene 3.0.

public class ConstantScoreRangeQuery
extends TermRangeQuery

A range query that returns a constant score equal to its boost for all documents in the exclusive range of terms.

It does not have an upper bound on the number of clauses covered in the range.

This query matches the documents looking for terms that fall into the supplied range according to String.compareTo(String). It is not intended for numerical ranges, use NumericRangeQuery instead.

This query is hardwired to MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT. If you want to change this, use TermRangeQuery instead.

Version:
$Id: ConstantScoreRangeQuery.java 797694 2009-07-25 00:03:33Z mikemccand $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.search.MultiTermQuery
MultiTermQuery.ConstantScoreAutoRewrite, MultiTermQuery.RewriteMethod
 
Field Summary
 
Fields inherited from class org.apache.lucene.search.MultiTermQuery
CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE, CONSTANT_SCORE_FILTER_REWRITE, rewriteMethod, SCORING_BOOLEAN_QUERY_REWRITE, term
 
Constructor Summary
ConstantScoreRangeQuery(String fieldName, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)
          Deprecated.  
ConstantScoreRangeQuery(String fieldName, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper, Collator collator)
          Deprecated.  
 
Method Summary
 String getLowerVal()
          Deprecated.  
 String getUpperVal()
          Deprecated.  
 void setRewriteMethod(MultiTermQuery.RewriteMethod method)
          Deprecated. Changes of mode are not supported by this class (fixed to constant score rewrite mode)
 
Methods inherited from class org.apache.lucene.search.TermRangeQuery
equals, getCollator, getEnum, getField, getLowerTerm, getUpperTerm, hashCode, includesLower, includesUpper, toString
 
Methods inherited from class org.apache.lucene.search.MultiTermQuery
clearTotalNumberOfTerms, getRewriteMethod, getTerm, getTotalNumberOfTerms, incTotalNumberOfTerms, rewrite
 
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)
Deprecated. 

ConstantScoreRangeQuery

public ConstantScoreRangeQuery(String fieldName,
                               String lowerVal,
                               String upperVal,
                               boolean includeLower,
                               boolean includeUpper,
                               Collator collator)
Deprecated. 
Method Detail

getLowerVal

public String getLowerVal()
Deprecated. 

getUpperVal

public String getUpperVal()
Deprecated. 

setRewriteMethod

public void setRewriteMethod(MultiTermQuery.RewriteMethod method)
Deprecated. 
Changes of mode are not supported by this class (fixed to constant score rewrite mode)

Overrides:
setRewriteMethod in class MultiTermQuery


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