Constructor TermRangeQuery
TermRangeQuery(String, String, String, Boolean, Boolean)
Constructs a query selecting all terms greater/equal than lowerTerm
but less/equal than 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.)
Declaration
public TermRangeQuery(String field, String lowerTerm, String upperTerm, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | The field that holds both lower and upper terms. |
System. |
lowerTerm | The term text at the lower end of the range |
System. |
upperTerm | The term text at the upper end of the range |
System. |
includeLower | If true, the |
System. |
includeUpper | If true, the |
TermRangeQuery(String, String, String, Boolean, Boolean, Globalization.CompareInfo)
Constructs a query selecting all terms greater/equal than
lowerTerm
but less/equal than 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.)
If 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 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.
Declaration
public TermRangeQuery(String field, String lowerTerm, String upperTerm, bool includeLower, bool includeUpper, Globalization.CompareInfo collator)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
System. |
lowerTerm | The Term text at the lower end of the range |
System. |
upperTerm | The Term text at the upper end of the range |
System. |
includeLower | If true, the |
System. |
includeUpper | If true, the |
System. |
collator | The collator to use to collate index Terms, to determine
their membership in the range bounded by |