ruby on rails - Sunspot: find all events in a country, or state -



ruby on rails - Sunspot: find all events in a country, or state -

the title not clear allow me explain:

in apps, have events. geolocated: store latitude , longitude. problem that, when users search events, type things like: kansas, montreal etc. when locate kansas (using geocoder), "center", , when inquire sunspot events "near" location, ones close center of location. it's worse if type france or australia.

i wondering if knew way handle that.

my thought right store country, state etc of location of event when it's saved (i can normalized address google), , text search of entered in location field...

but there problem approach :( in solr, it's impossible following:

any_of with(:coordinates).near(coord[0], coord[1], :precision => 3) keywords end

because near can't nested. see here.

did create changes in sunspot 1.3 allow that?

do see other solution? might take changing solr search platform elastic search prefer not to.

i switched elasticsearch, , absolutely love it. it's much improve geolocation search... still have problems facets, overall recommend es on sunspot starting new app.

ruby-on-rails ruby-on-rails-3 search geolocation sunspot

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -