1) Sunspot 1.2 no longer uses solr-spatial-light, but instead uses a
geohash matching query to take advantage of Solr's fulltext
capabilities for spatial search. This approach does not yield
distances at all, so your best bet is to just do the calculations at
the application layer.
2) See above -- 1.2 no longer uses solr-spatial-light
3) Not with Sunspot's existing capabilities, although you may be able
to hand-roll something using geohashes that does what you need.
Mat
> --
> You received this message because you are subscribed to the Google Groups "Sunspot" group.
> To post to this group, send email to ruby-s...@googlegroups.com.
> To unsubscribe from this group, send email to ruby-sunspot...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ruby-sunspot?hl=en.
>
>
Sorry if my previous email wasn't clear. Sunspot 1.2 made a conscious decision to stop using solr-spatial-light because we determined that the plugin has serious performance problems at scale. Instead, it uses a geohash-based spatial search that relies only on Solr's built-in fulltext search capabilities; this is considerably more performant and has the added bonus of allowing result scoring to account for both fulltext relevance and geographical proximity in searches that include both components.
Geohash search is not without its downsides: in particular, distance-based filtering and ordering is approximate and can behave badly in edge cases. Nick Zadrozny is working on refining the geohash query logic to take care of the edge cases, but geohash-based search will necessarily never be completely accurate. It is performant at scale precisely because it does not actually calculate distances from the search origin to each document in the index; that's why you no longer get distances with your search results.
So what you're seeing is "not a bug, it's a feature". It's a feature that isn't without its tradeoffs, but I felt (and the Sunspot community largely agreed) that the tradeoffs were worth getting good performance at scale; relying only on core Solr features; and gaining the ability to mix fulltext and spatial considerations when scoring results.
Mat