sunspot/sunspot — pull request #427 by nubis (2013-07-06 19:42:40+00:00)
Title: Added support for multi-select facets to Sunspot::Query::Geofilt

Trying to exclude a geo filter from a facet currently results in an error, because geospatial queries do not have a 'tag' method. Furthermore, the exclusion tags required for excluding a geofilt query are not being generated at all.

Here's an example of what I want to do, filter anything within 100 miles but also always build a facet for things closer than that.

```ruby
location_filter = with(:location).in_radius(*coords, 100)
facet(:distance, exclude: location_filter) do
row('1') do
with(:location).in_radius(*coords, 1)
end
row('5') do
with(:location).in_radius(*coords, 5)
end
row('15') do
with(:location).in_radius(*coords, 15)
end
row('50') do
with(:location).in_radius(*coords, 50)
end
end
```

This patch addresses those issues, I tried to inherit everything from Restriction::Base but I guess there may be some slight duplication in the to_solr_conditional method of Sunspot::Query::Geofilt, someone more familiar with this codebase should be able to remove the duplication.

cheers

----nubis