Constructs a query selecting all terms greater than
CopyC#
lowerTerm
but less than
CopyC#
upperTerm
. There must be at least one term and either term may be null, in which case there is no bound on that side, but if there are two terms, both terms must be for the same field.

If

CopyC#
collator
is not null, it will be used to decide whether index terms are within the given range, rather than using the Unicode code point order in which index terms are stored.

WARNING: Using this constructor and supplying a non-null value in the

CopyC#
collator
parameter will cause every single index Term in the Field referenced by lowerTerm and/or upperTerm to be examined. Depending on the number of index Terms in this Field, the operation could be very slow.

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

Syntax

C#
public RangeQuery(
	Term lowerTerm,
	Term upperTerm,
	bool inclusive,
	CompareInfo collator
)
Visual Basic
Public Sub New ( _
	lowerTerm As Term, _
	upperTerm As Term, _
	inclusive As Boolean, _
	collator As CompareInfo _
)
Visual C++
public:
RangeQuery(
	Term^ lowerTerm, 
	Term^ upperTerm, 
	bool inclusive, 
	CompareInfo^ collator
)

Parameters

lowerTerm
Type: Lucene.Net.Index..::..Term
The Term at the lower end of the range
upperTerm
Type: Lucene.Net.Index..::..Term
The Term at the upper end of the range
inclusive
Type: System..::..Boolean
If true, both
CopyC#
lowerTerm
and
CopyC#
upperTerm
will themselves be included in the range.
collator
Type: System.Globalization..::..CompareInfo
The collator to use to collate index Terms, to determine their membership in the range bounded by
CopyC#
lowerTerm
and
CopyC#
upperTerm
.

See Also