DB indexes

* Search given a date
* Add sort to the find method
* Ensures indexes when the app starts