Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add precision to datetime field and datetime field internally expressed in microsecs. #1408

Closed
fulmicoton opened this issue Jul 6, 2022 · 1 comment · Fixed by #1396
Closed
Assignees

Comments

@fulmicoton
Copy link
Collaborator

fulmicoton commented Jul 6, 2022

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 rfc3339 format.
  • The query parsing with support only for rfc3339 format.
  • 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 i64 using 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 i64 representing the unix-timestamp value in microseconds of the parsed input without any precision knowledge.
@fmassot
Copy link
Contributor

fmassot commented May 3, 2023

Closed by #1396

@fmassot fmassot closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants