Constructs a query selecting all terms greater/equal than
CopyC#
lowerTerm
but less/equal than
CopyC#
upperTerm
.

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.)

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

Syntax

C#
public TermRangeQuery(
	string field,
	string lowerTerm,
	string upperTerm,
	bool includeLower,
	bool includeUpper
)
Visual Basic
Public Sub New ( _
	field As String, _
	lowerTerm As String, _
	upperTerm As String, _
	includeLower As Boolean, _
	includeUpper As Boolean _
)
Visual C++
public:
TermRangeQuery(
	String^ field, 
	String^ lowerTerm, 
	String^ upperTerm, 
	bool includeLower, 
	bool includeUpper
)

Parameters

field
Type: System..::..String
The field that holds both lower and upper terms.
lowerTerm
Type: System..::..String
The term text at the lower end of the range
upperTerm
Type: System..::..String
The term text at the upper end of the range
includeLower
Type: System..::..Boolean
If true, the
CopyC#
lowerTerm
is included in the range.
includeUpper
Type: System..::..Boolean
If true, the
CopyC#
upperTerm
is included in the range.

See Also