C# (CSharp) Raven.Abstractions.Linq Пространство имен

Классы

Имя Описание
DateTools Provides support for converting dates to strings and vice-versa. The strings are structured so that lexicographic sorting orders them by date, which makes them suitable for use as field values and search terms.

This class also helps you to limit the resolution of your dates. Do not save dates with a finer resolution than you really need, as then RangeQuery and PrefixQuery will require more memory and become slower.

Compared to {@link DateField} the strings generated by the methods in this class take slightly more space, unless your selected resolution is set to Resolution.DAY or lower.

Another approach is {@link NumericUtils}, which provides a sortable binary representation (prefix encoded) of numeric values, which date/time are. For indexing a {@link Date} or {@link Calendar}, just get the Unix timestamp as long using {@link Date#getTime} or {@link Calendar#getTimeInMillis} and index this as a numeric value with {@link NumericField} and use {@link NumericRangeQuery} to query it.

DateTools.Resolution Specifies the time granularity.