Open
Conversation
Contributor
Author
|
I just realized that weekday is highly locale dependent. In this pull request it is fixed at UTC, but that would have to be configurable to be really usable. Or (the heavy option): Index 24 different terms (one for each 1-hour timezone offset) in the field for each document. |
Contributor
|
I think this is a good step to help explore this kind of thing. If the locale is made configurable, that should make it usable by folks outside of GMT. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have two timestamps:
crawl_date, which is authoritative from the crawler, andlast_modified, which is extracted by Tika from the source data. This pull request addsweekday(Monday, Tuesday, Wednesday...) andtime_of_day(16:44:30) to both of these fields. As Solr has no concept of time without a full date, thetime_of_dayis prefixed with0001-01-01. Indexing this ways means that date math works as expected. An alternative way would be to havesecond_of_dayor something like that, but that requires translation from the user interface.The use-cases for
last_modifiedare fairly obvious: e.g. with this, it is possible to find images taken from Friday evening to Saturday morning.It is more dubious for
crawl_dateas that timestamp does not say much about when the material was created. It might be useful for debugging crawls? I would appreciate input on whether thecrawl_date-additions should be included or not.This pull request closes #161.