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 {@link String#compareTo(String)}. It is not intended for numerical ranges, use {@link NumericRangeQuery} instead.

This query is hardwired to {@link MultiTermQuery#CONSTANT_SCORE_AUTO_REWRITE_DEFAULT}. If you want to change this, use {@link TermRangeQuery} instead.

Namespace: Lucene.Net.Search
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
[SerializableAttribute]
[ObsoleteAttribute("Use TermRangeQuery for term ranges or NumericRangeQuery for numeric ranges instead. This class will be removed in Lucene 3.0.")]
public class ConstantScoreRangeQuery : TermRangeQuery
Visual Basic
<SerializableAttribute> _
<ObsoleteAttribute("Use TermRangeQuery for term ranges or NumericRangeQuery for numeric ranges instead. This class will be removed in Lucene 3.0.")> _
Public Class ConstantScoreRangeQuery _
	Inherits TermRangeQuery
Visual C++
[SerializableAttribute]
[ObsoleteAttribute(L"Use TermRangeQuery for term ranges or NumericRangeQuery for numeric ranges instead. This class will be removed in Lucene 3.0.")]
public ref class ConstantScoreRangeQuery : public TermRangeQuery

Inheritance Hierarchy

System..::..Object
  Lucene.Net.Search..::..Query
    Lucene.Net.Search..::..MultiTermQuery
      Lucene.Net.Search..::..TermRangeQuery
        Lucene.Net.Search..::..ConstantScoreRangeQuery

See Also