public class DateFilter
extends org.apache.lucene.search.Filter
For this to work, documents must have been indexed with a
DateField
.
Constructor and Description |
---|
DateFilter(java.lang.String f,
java.util.Date from,
java.util.Date to)
Constructs a filter for field
f matching dates
between from and to inclusively. |
DateFilter(java.lang.String f,
long from,
long to)
Constructs a filter for field
f matching times
between from and to inclusively. |
Modifier and Type | Method and Description |
---|---|
static DateFilter |
After(java.lang.String field,
java.util.Date date)
Constructs a filter for field
f matching
dates on or after date . |
static DateFilter |
After(java.lang.String field,
long time)
Constructs a filter for field
f matching
times on or after time . |
static DateFilter |
Before(java.lang.String field,
java.util.Date date)
Constructs a filter for field
f matching
dates on or before before date . |
static DateFilter |
Before(java.lang.String field,
long time)
Constructs a filter for field
f matching times
on or before time . |
java.util.BitSet |
bits(org.apache.lucene.index.IndexReader reader)
Returns a BitSet with true for documents which should be
permitted in search results, and false for those that should
not.
|
java.lang.String |
toString() |
public DateFilter(java.lang.String f, java.util.Date from, java.util.Date to)
f
matching dates
between from
and to
inclusively.public DateFilter(java.lang.String f, long from, long to)
f
matching times
between from
and to
inclusively.public static DateFilter Before(java.lang.String field, java.util.Date date)
f
matching
dates on or before before date
.public static DateFilter Before(java.lang.String field, long time)
f
matching times
on or before time
.public static DateFilter After(java.lang.String field, java.util.Date date)
f
matching
dates on or after date
.public static DateFilter After(java.lang.String field, long time)
f
matching
times on or after time
.public java.util.BitSet bits(org.apache.lucene.index.IndexReader reader) throws java.io.IOException
bits
in class org.apache.lucene.search.Filter
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.