Hi all,

I'm trying to use geo-location based search using sphinx, Here my search
query.

@search = Ultrasphinx::Search.new(:sort_mode => 'extended', :sort_by =>
'distance', :location => {:units => 'degrees', :lat => 40.7414, :long =>
-74.0014})

@search.results.collect{|x| x.distance}

[0.69084495306015, 400.852783203125, 8684957.0]


But when using :query with geo-location it returns distance as NaN

@search = Ultrasphinx::Search.new(:query=>"sr.software",:sort_mode =>
'extended', :sort_by => 'distance', :location => {:units => 'degrees',
:lat => 40.7414, :long => -74.0014})

@search.results.collect{|x| x.distance}

[NaN, NaN, NaN]

Please suggest one good solution to use both :query and :location


Regards,
T.Veeraa.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to