tantivy
tantivy copied to clipboard
Add precision to datetime field and datetime field internally expressed in microsecs.
In order to have a better DateTime support , In Tantivy, we need to implement:
- Update the current DateTime type to hold unix-timestamp in microseconds
- The input parsing with support only for
rfc3339format. - The query parsing with support only for
rfc3339format. - DateTime fields will be output in unix-timestamp microsecond, This helps Tantivy users format the value in whatever format for display.
- Assume all DateTime received to be in UTC if not explicitly specified in the format
The DateTime field schema spec needs precision.
- FastField: We will internally store all dates in
i64using the unix-timestamp microseconds value. The precision option will be used to store what’s exactly needed in fast fields. As of now, we won’t support nanosecond precision. - In docStore: We store the timestamp as
i64representing the unix-timestamp value in microseconds of the parsed input without any precision knowledge.