java.lang.Object | |||
↳ | org.apache.lucene.search.Filter | ||
↳ | org.apache.lucene.search.MultiTermQueryWrapperFilter<Q extends org.apache.lucene.search.MultiTermQuery> | ||
↳ | org.apache.lucene.search.TermRangeFilter |
A Filter that restricts search results to a range of term values in a given field.
This filter matches the documents looking for terms that fall into the
supplied range according to compareTo(String)
, unless a Collator
is provided. It is not intended
for numerical ranges; use NumericRangeFilter
instead.
If you construct a large number of range filters with different ranges but on the
same field, FieldCacheRangeFilter
may have significantly better performance.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.search.MultiTermQueryWrapperFilter
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a filter for field
fieldName matching
less than or equal to upperTerm . | |||||||||||
Constructs a filter for field
fieldName matching
greater than or equal to lowerTerm . | |||||||||||
Returns the collator used to determine range inclusion, if any.
| |||||||||||
Returns the field name for this filter
| |||||||||||
Returns the lower value of this range filter
| |||||||||||
Returns the upper value of this range filter
| |||||||||||
Returns
true if the lower endpoint is inclusive | |||||||||||
Returns
true if the upper endpoint is inclusive |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.search.MultiTermQueryWrapperFilter
| |||||||||||
From class
org.apache.lucene.search.Filter
| |||||||||||
From class
java.lang.Object
|
fieldName | The field this range applies to |
---|---|
lowerTerm | The lower bound on this range |
upperTerm | The upper bound on this range |
includeLower | Does this range include the lower bound? |
includeUpper | Does this range include the upper bound? |
IllegalArgumentException | if both terms are null or if lowerTerm is null and includeLower is true (similar for upperTerm and includeUpper) |
---|
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.
lowerTerm | The lower bound on this range |
---|---|
upperTerm | The upper bound on this range |
includeLower | Does this range include the lower bound? |
includeUpper | Does this range include the upper bound? |
collator | The collator to use when determining range inclusion; set to null to use Unicode code point ordering instead of collation. |
IllegalArgumentException | if both terms are null or if lowerTerm is null and includeLower is true (similar for upperTerm and includeUpper) |
---|
Constructs a filter for field fieldName
matching
less than or equal to upperTerm
.
Constructs a filter for field fieldName
matching
greater than or equal to lowerTerm
.
Returns true
if the lower endpoint is inclusive
Returns true
if the upper endpoint is inclusive