Re: Distances in spatial search (Solr 4.0)

2011-03-01 Thread Alexandre Rocco
Hi Bill,

I was using a different approach to sort by the distance with the dist()
function, since geodist() is not documented on the wiki (
http://wiki.apache.org/solr/FunctionQuery)

Tried something like:
sort=dist(2, 45.15,-93.85, lat, lng) asc

I made some tests with geodist() function as you pointed and got different
results.
Is it safe to assume that geodist() is the correct way of doing it?

Also, can you clear up how can I see the distance using the _Val_ as you
told?

Thanks!
Alexandre

On Tue, Mar 1, 2011 at 12:03 AM, Bill Bell billnb...@gmail.com wrote:

 Use sort with geodist() to sort by distance.

 Getting the distance returned us documented on the wiki if you are not
 using score. see reference to _Val_

 Bill Bell
 Sent from mobile


 On Feb 28, 2011, at 7:54 AM, Alexandre Rocco alel...@gmail.com wrote:

  Hi guys,
 
  We are implementing a separate index on our website, that will be
 dedicated
  to spatial search.
  I've downloaded a build of Solr 4.0 to try the spatial features and got
 the
  geodist working really fast.
 
  We now have 2 other features that will be needed on this project:
  1. Returning the distance from the reference point to the search hit (in
  kilometers)
  2. Sorting by the distance.
 
  On item 2, the wiki doc points that a distance function can be used but I
  was not able to find good info on how to accomplish it.
  Also, returning the distance (item 1) is noted as currently being in
  development and there is some workaround to get it.
 
  Anyone had experience with the spatial feature and could help with some
  pointers on how to achieve it?
 
  Thanks,
  Alexandre



Re: Distances in spatial search (Solr 4.0)

2011-03-01 Thread William Bell
See http://wiki.apache.org/solr/SpatialSearch and yest use sort=geodist()+asc

This Wiki page has everything you should need\.


On Tue, Mar 1, 2011 at 3:49 PM, Alexandre Rocco alel...@gmail.com wrote:
 Hi Bill,

 I was using a different approach to sort by the distance with the dist()
 function, since geodist() is not documented on the wiki (
 http://wiki.apache.org/solr/FunctionQuery)

 Tried something like:
 sort=dist(2, 45.15,-93.85, lat, lng) asc

 I made some tests with geodist() function as you pointed and got different
 results.
 Is it safe to assume that geodist() is the correct way of doing it?

 Also, can you clear up how can I see the distance using the _Val_ as you
 told?

 Thanks!
 Alexandre

 On Tue, Mar 1, 2011 at 12:03 AM, Bill Bell billnb...@gmail.com wrote:

 Use sort with geodist() to sort by distance.

 Getting the distance returned us documented on the wiki if you are not
 using score. see reference to _Val_

 Bill Bell
 Sent from mobile


 On Feb 28, 2011, at 7:54 AM, Alexandre Rocco alel...@gmail.com wrote:

  Hi guys,
 
  We are implementing a separate index on our website, that will be
 dedicated
  to spatial search.
  I've downloaded a build of Solr 4.0 to try the spatial features and got
 the
  geodist working really fast.
 
  We now have 2 other features that will be needed on this project:
  1. Returning the distance from the reference point to the search hit (in
  kilometers)
  2. Sorting by the distance.
 
  On item 2, the wiki doc points that a distance function can be used but I
  was not able to find good info on how to accomplish it.
  Also, returning the distance (item 1) is noted as currently being in
  development and there is some workaround to get it.
 
  Anyone had experience with the spatial feature and could help with some
  pointers on how to achieve it?
 
  Thanks,
  Alexandre




Distances in spatial search (Solr 4.0)

2011-02-28 Thread Alexandre Rocco
Hi guys,

We are implementing a separate index on our website, that will be dedicated
to spatial search.
I've downloaded a build of Solr 4.0 to try the spatial features and got the
geodist working really fast.

We now have 2 other features that will be needed on this project:
1. Returning the distance from the reference point to the search hit (in
kilometers)
2. Sorting by the distance.

On item 2, the wiki doc points that a distance function can be used but I
was not able to find good info on how to accomplish it.
Also, returning the distance (item 1) is noted as currently being in
development and there is some workaround to get it.

Anyone had experience with the spatial feature and could help with some
pointers on how to achieve it?

Thanks,
Alexandre


Re: Distances in spatial search (Solr 4.0)

2011-02-28 Thread Bill Bell
Use sort with geodist() to sort by distance.

Getting the distance returned us documented on the wiki if you are not using 
score. see reference to _Val_

Bill Bell
Sent from mobile


On Feb 28, 2011, at 7:54 AM, Alexandre Rocco alel...@gmail.com wrote:

 Hi guys,
 
 We are implementing a separate index on our website, that will be dedicated
 to spatial search.
 I've downloaded a build of Solr 4.0 to try the spatial features and got the
 geodist working really fast.
 
 We now have 2 other features that will be needed on this project:
 1. Returning the distance from the reference point to the search hit (in
 kilometers)
 2. Sorting by the distance.
 
 On item 2, the wiki doc points that a distance function can be used but I
 was not able to find good info on how to accomplish it.
 Also, returning the distance (item 1) is noted as currently being in
 development and there is some workaround to get it.
 
 Anyone had experience with the spatial feature and could help with some
 pointers on how to achieve it?
 
 Thanks,
 Alexandre


Spatial search - Solr 4.0

2010-12-07 Thread Jae Joo
Hi,

I am implementing spatial search and found some odd things. As I know that
the returning distance is still being implemented, so I have implement
algorithm to calculate the actual distance based on lat and long returned.
when I do it, I have found the sort is not working properly. Any thing I
missed?

Jae


Re: Spatial search - Solr 4.0

2010-12-07 Thread Erick Erickson
What version of solr are you using? What is your configuration?
What query are you using?

Best
Erick

On Tue, Dec 7, 2010 at 5:40 PM, Jae Joo jaejo...@gmail.com wrote:

 Hi,

 I am implementing spatial search and found some odd things. As I know that
 the returning distance is still being implemented, so I have implement
 algorithm to calculate the actual distance based on lat and long returned.
 when I do it, I have found the sort is not working properly. Any thing I
 missed?

 Jae