Ultrasphinx : Geo-location look-up returns NAN

Hi all,

I'm trying to use geo-location based search using ultrasphinx, 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}

It return result properly

[0.69084495306015, 400.852783203125, 8684957.0]

But when using :query 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.