codeforboston / pantry_pickup

Combining city data with a list of specific needs from food pantries will allow citizens to most effectively make useful and needed donations assisted by the Pantry Pick-Up App.
http://www.pantrypickup.org
21 stars 35 forks source link

Update search function #5

Open eucalyptustree opened 11 years ago

eucalyptustree commented 11 years ago

Search function currently returns all pantries as a result.

Search needs to be updated to search by location (current location or specified zip/town/etc), as well as by time/day of week.

Search results should offer option to sort by proximity OR by date/time.

ohnorobo commented 11 years ago

Location will require adding geospatial indexes to mongo, we can then pass the current location and return search results ordered by proximity, which will make the left-side list easier to read. This could also include a distance-to-pantry indication in the list.

ohnorobo commented 11 years ago

Search by location is done.

Other facets to add:

ohnorobo commented 11 years ago

Would we want to add straight up search-by-name? I don't know if people are likely to come to the site knowing the name but not the location of a pantry.

JBaldachino commented 11 years ago

I'll add the geospacial index to mongodb. It won't take long, but I'm packed tomorrow and then I leave until Sunday.

I'll be offline while I'm gone, so probably by next Monday or Tuesday

ohnorobo commented 11 years ago

We already have geospatial indexing in mongo. There are other kinds of search we want to add, but proximity-to-location is working.

rlaskey commented 11 years ago

I have a dynamic search-by-area sorted out in my latest commit. It'll find locations near the current view. The list view is much more usable as a result.

Time is still tricky. We may want to tackle simple cases first, and always return ones with more complicated hours (second Tuesday, etc.) in the group.

I also vote for not doing a search by name. It'll confuse the interface, and if people know of a place they'll likely know where it is and can search by that.