de.pangaea.metadataportal.search
Class DateRangeQuery
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.search.ConstantScoreQuery
de.pangaea.metadataportal.search.DateRangeQuery
- All Implemented Interfaces:
- Serializable, Cloneable
public final class DateRangeQuery
- extends org.apache.lucene.search.ConstantScoreQuery
A Lucene Query that implements a trie-based range query on date fields.
This class wraps a NumericRangeFilter from Lucene.
- See Also:
NumericRangeFilter,
Serialized Form
| Nested classes/interfaces inherited from class org.apache.lucene.search.ConstantScoreQuery |
org.apache.lucene.search.ConstantScoreQuery.ConstantScorer, org.apache.lucene.search.ConstantScoreQuery.ConstantWeight |
| Fields inherited from class org.apache.lucene.search.ConstantScoreQuery |
filter |
|
Constructor Summary |
DateRangeQuery(String field,
int precisionStep,
Date min,
Date max,
boolean minInclusive,
boolean maxInclusive)
A trie query using the supplied field with range bounds in date/time form. |
| Methods inherited from class org.apache.lucene.search.ConstantScoreQuery |
createWeight, equals, extractTerms, getFilter, hashCode, rewrite |
| Methods inherited from class org.apache.lucene.search.Query |
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight |
DateRangeQuery
public DateRangeQuery(String field,
int precisionStep,
Date min,
Date max,
boolean minInclusive,
boolean maxInclusive)
- A trie query using the supplied field with range bounds in date/time form.
You can set
min or max to null to leave one bound open.
With minInclusive and maxInclusive can be choosen, if the corresponding
bound should be included or excluded from the range.
toString
public String toString(String field)
- Overrides:
toString in class org.apache.lucene.search.ConstantScoreQuery
Copyright ©2007-2009 panFMP Developers c/o Uwe Schindler