Class DateField
Provides support for converting dates to strings and vice-versa. The strings are structured so that lexicographic sorting orders by date, which makes them suitable for use as field values and search terms.
Note that this class saves dates with millisecond granularity,
which is bad for Term
Note: dates before 1970 cannot be used, and therefore cannot be
indexed when using this class. See Date
Another approach is Lucene.long
and
index this as a numeric value with Numeric
Inheritance
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public class DateField : object
Methods
Name | Description |
---|---|
Date |
Converts a Date to a string suitable for indexing. |
MAX_DATE_STRING() | |
MIN_DATE_STRING() | |
String |
Converts a string-encoded date into a Date object. |
String |
Converts a string-encoded date into a millisecond time. |
Time |
Converts a millisecond time to a string suitable for indexing. |