de.pangaea.metadataportal.search
Class DateRangeQuery

java.lang.Object
  extended by org.apache.lucene.search.Query
      extended by org.apache.lucene.search.ConstantScoreQuery
          extended by 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 Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.search.ConstantScoreQuery
org.apache.lucene.search.ConstantScoreQuery.ConstantScorer, org.apache.lucene.search.ConstantScoreQuery.ConstantWeight
 
Field Summary
 
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.
 
Method Summary
 String toString(String field)
           
 
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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.

Method Detail

toString

public String toString(String field)
Overrides:
toString in class org.apache.lucene.search.ConstantScoreQuery


Copyright ©2007-2009 panFMP Developers c/o Uwe Schindler