azavea/franklin

datetimes not inserted with item creation

jisantuc opened this issue · 1 comments

Describe the bug

#630 pulled out and indexed the datetime fields of items. That's great, but for new items, we don't actually insert those fields 🤦🏻‍♂️ (and we sensibly don't fall back to item properties). This can lead to surprising behavior, where you query for items that definitely match your datetime query, and you don't get any back.

Expected behavior
In import and item POST, those fields should be populated

Additional context
We could do this quick and dirty but I'd rather not -- instead, since we know things about datetime being required, we should do the ADT thing from stac-utils/stac4s#120 (comment) and handle the insert accordingly

Franklin does not not properly fill start_datetime, end_datetime or datetime table fields, see StacItemDao insert methods.

TLDR; All temporal queries of new items are non functional right now due to that issue.

A motivating picture of the collection_items table after the fresh catalog ingest with the most up to date Franklin:

image