Are your current columns considered floats by Rails? And are you  
getting results in any order? Or no results at all?

-- 
Pat

On 24/07/2009, at 6:58 PM, DB_John wrote:

>
> Yes, I'm storing my lat & lng in radians on my Locations table.  I'm
> doing my searches exactly as specified in the rdoc:
>
> CoffeeShop.search "Starbucks", :geo => [-0.55, 3.108], :order =>
> "@geodist asc"
>
> I tried creating lat/lng float columns in my CoffeeShop model and
> populating them with values from the Locations table, and the geo
> searching worked fine.  Perhaps my index definition syntax is wrong?
>
> -john
>
> On Jul 24, 1:57 am, Pierre Valade <[email protected]> wrote:
>> HI,
>>
>> Do you store your lat, lng in degrees or radians ?
>>
>> Can you pastie your Model.search also?
>>
>> Thanks,
>> Pierre
>>
>> On Jul 23, 6:51 pm, DB_John <[email protected]> wrote:
>>
>>
>>
>>> Can the geocode attributes of a model be set to attributes from an
>>> associated model?
>>
>>> I have a CoffeeShop model that stores its location information in a
>>> Location model.  I've been trying different versions of the  
>>> following
>>> to no success:
>>
>>>   define_index do
>>>     has location(:lat), :as => :latit
>>>     has location(:lng), :as => :longit
>>
>>>     set_property :latitude_attr   => :latit
>>>     set_property :longitude_attr  => :longit
>>>   end
>>
>>> Do I need to explicitly add those lat/lng columns to my CoffeeShop
>>> table?
>>
>>> Thanks,
>>> John
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" 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/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to