How to solve?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to solve?

Billnbell
We are entering entries into SOLR like the following, and we want to see if
my pt matches any of these radiuses.

1. Red, pt=39,-107, radius=10km
2. Blue, pt=39,-108, radius=50km

I want to run a SOLR select with a pt=39,-104 and see if it is within 10km
of point 1, and 50km of point 2?

Usually I know you can :

http://localhost:8983/select?q=*:*&pt=39,-104&sfield=solr_geohash&d= ??

One idea was to use bbox and find the N,S,E,W pt for point 1 and point 2.
But this is not idea, we want to use Great Circle.

Thoughts?


--
Bill Bell
[hidden email]
cell 720-256-8076
Reply | Threaded
Open this post in threaded view
|

Re: How to solve?

Erik Hatcher-4
I'll have to not be mobile and thumbing a reply to give a concrete example but you'll need to use the nested query parsing facility to make a boolean AND query of two geofilts or bboxes, each with local params.  

   Erik

> On Dec 28, 2016, at 02:12, William Bell <[hidden email]> wrote:
>
> We are entering entries into SOLR like the following, and we want to see if
> my pt matches any of these radiuses.
>
> 1. Red, pt=39,-107, radius=10km
> 2. Blue, pt=39,-108, radius=50km
>
> I want to run a SOLR select with a pt=39,-104 and see if it is within 10km
> of point 1, and 50km of point 2?
>
> Usually I know you can :
>
> http://localhost:8983/select?q=*:*&pt=39,-104&sfield=solr_geohash&d= ??
>
> One idea was to use bbox and find the N,S,E,W pt for point 1 and point 2.
> But this is not idea, we want to use Great Circle.
>
> Thoughts?
>
>
> --
> Bill Bell
> [hidden email]
> cell 720-256-8076