I think you can do this by a combination of standard function queries,
see: http://wiki.apache.org/solr/FunctionQuery#if
and geodist, see:
http://wiki.apache.org/solr/SpatialSearch#geodist_-_The_distance_function

WARNING: I haven't tried this myself, but it seems like it would work. The
trick is to have your function return 0 for docs you want to exclude. Since
that's
multiplied into the score, you effectively eliminate the doc from your
result
set.

Best,
Erick


On Mon, Aug 19, 2013 at 8:53 AM, Shishir Jain <shishir.j...@gmail.com>wrote:

> Hi,
>
> I have a very standard use case of Spatial search. Was trying to figure out
> how to do it in Solr, but couldn't figure out a standard way of doing it.
> Please point me to any document which explains this use case or how this
> specific use case can be implemented in Solr.
>
> The Use case is:
>
> There is database of Food Joints who deliver food. Each of them have a
> different serving distance. So, when a user is requesting for a list of
> food joints which can serve at his/her location, it needs to find the
> distance between the user and food joint and the distance served by each of
> these joints and if the distance between the user and the food joint is
> less than the distance served, return the list. The geo co-ordiantes of the
> food joint and the radius of the distance served is pre-known and stored in
> the solr
>
> Now I'm trying to get this list directly from solr, but couldn't find any
> way. Please let me know if this use case is handled by Solr Spatial search
> and yes, how to do it. If no, what other Solr users have figured out as a
> work-around?
>
> Best regards,
> Shishir
>

Reply via email to