I don't think that's possible with the way solr-spatial-light works --
it recieves the spatial component in its own Solr param so it can't
readily be incorporated into a disjunction.
Sunspot 1.2's geohash approach makes that *more* possible, but the
Sunspot API doesn't support it at the moment. The reason for this is
that the geohash portion of a search is passed via the :q param,
whereas other scope is passed via :fq params. However, I'm now
thinking that in the case that you'd like to disjunct a near()
restriction with something else, you could just put them in the :fq
param and lose distance-based scoring (seems fine for your use case).
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.
>
>
That comment is correct, but not because of solr-spatial-light -- the
new geohash search uses fulltext boost/scoring to get results in
(rough) order of geographic distance, which is why they have to go
into the :q parameter; :fq queries are always constant-score.
I mulled over a few different options for how to deal with that fact
-- including allowing multiple :q-parameter components in a
disjunction as long as there aren't any :fq-parameter ones -- but
coming up with a good API design and implementation was looking like
it would delay the 1.2 release more than I was willing to.
At this point, though, I'm thinking that a simplified near()
restriction -- no boosting, just a simple prefix on a lower-precision
geohash -- could be allowed inside a disjunction, with the caveat that
results in that case would not be scored/sorted by geographical
distance. Seems like a fairly easy win with no downside, despite not
necessarily being the ideal solution.
Mat