18F / open-data-maker

make it easy to turn a lot of potentially large csv files into easily accessible open data
Other
199 stars 135 forks source link

add back location field type for location.lat & location.lon field filter #314

Open kynetiv opened 8 years ago

kynetiv commented 8 years ago

This PR address #227, where location.lat and location.lon values are not being returned in a fields search because they are explicitly being excluded from the field_types and the error checker kicks out the request.

The above issue mentions excluding lat and lon was done on a special case for the location field (necessary for geo search by distance?), however, I don't see any issue that keeping lat/lon has an affect on a distance search.

Additionally, in order to store and index the lat and lon so as to return them in a fields filter query, we need to set the lat_lon mapping option for the location field's geo_point type. The lat_lon option will then index these values as fields.

Also needed to update a couple tests that we're expecting lat/lon to not be able to return results as well as added a test for a field filter query to return coordinates.

yozlet commented 8 years ago

Looks good to me!