Weekday & time of day #177
Open
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.