You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by roySolr <ro...@gmail.com> on 2011/05/11 16:55:39 UTC
Spatial search - SOLR 3.1
Hello,
I'm using the spatial solr plugin from jteam for SOLR 1.4. Now i want to use
SOLR 3.1 because it contains
a lot of bugfixes:) Now i want to get a distance field back in my results.
How can i do it?
My url looks like:
q=testquery&fq={!geofilt pt=52.78556,3.4546 sfield=latlon d=50}
I get only the results between the distance(50 km) and that's great. I only
missing the
distance field for every document in the response.
--
View this message in context: http://lucene.472066.n3.nabble.com/Spatial-search-SOLR-3-1-tp2927579p2927579.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Spatial search - SOLR 3.1
Posted by roySolr <ro...@gmail.com>.
Hello David,
It's easy to calculate it by myself but it was nice if SOLR returns distance
in the response. I can sort
on distance and calculate the distance with PHP to show it to the users.
--
View this message in context: http://lucene.472066.n3.nabble.com/Spatial-search-SOLR-3-1-tp2927579p2930926.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Spatial search - SOLR 3.1
Posted by Bill Bell <bi...@gmail.com>.
Look up a few lines to see q={!func}geodist()
...&q={!func}geodist()&sfield=store&pt=45.15,-93.85&sort=score asc
<http://localhost:8983/solr/select?wt=json&indent=true&fl=name,store,score&
q={!func}geodist()&sfield=store&pt=45.15,-93.85&sort=score+asc>
On 5/11/11 9:25 AM, "Smiley, David W." <ds...@mitre.org> wrote:
>Hi Roy.
>
>See this:
>http://wiki.apache.org/solr/SpatialSearch#Returning_the_distance
>
>I recommend returning the point location and calculating the distance
>yourself -- it's not hard. Getting Solr to return it is a bit of a hack
>now.
>
>~ David Smiley
>Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
>
>On May 11, 2011, at 10:55 AM, roySolr wrote:
>
>> Hello,
>>
>> I'm using the spatial solr plugin from jteam for SOLR 1.4. Now i want
>>to use
>> SOLR 3.1 because it contains
>> a lot of bugfixes:) Now i want to get a distance field back in my
>>results.
>> How can i do it?
>>
>> My url looks like:
>>
>> q=testquery&fq={!geofilt pt=52.78556,3.4546 sfield=latlon d=50}
>>
>> I get only the results between the distance(50 km) and that's great. I
>>only
>> missing the
>> distance field for every document in the response.
>>
>> --
>> View this message in context:
>>http://lucene.472066.n3.nabble.com/Spatial-search-SOLR-3-1-tp2927579p2927
>>579.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
Re: Spatial search - SOLR 3.1
Posted by "Smiley, David W." <ds...@mitre.org>.
Hi Roy.
See this:
http://wiki.apache.org/solr/SpatialSearch#Returning_the_distance
I recommend returning the point location and calculating the distance yourself -- it's not hard. Getting Solr to return it is a bit of a hack now.
~ David Smiley
Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/
On May 11, 2011, at 10:55 AM, roySolr wrote:
> Hello,
>
> I'm using the spatial solr plugin from jteam for SOLR 1.4. Now i want to use
> SOLR 3.1 because it contains
> a lot of bugfixes:) Now i want to get a distance field back in my results.
> How can i do it?
>
> My url looks like:
>
> q=testquery&fq={!geofilt pt=52.78556,3.4546 sfield=latlon d=50}
>
> I get only the results between the distance(50 km) and that's great. I only
> missing the
> distance field for every document in the response.
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Spatial-search-SOLR-3-1-tp2927579p2927579.html
> Sent from the Solr - User mailing list archive at Nabble.com.