Hi Pat,

Thanks for responding :)

I'm using RADIANS version for Sphinx, but Degrees for MultiGeocode.

I'll look into renaming to avoid confusion.

Manish

On Oct 10, 2011, at 5:58 PM, Pat Allan wrote:

> Hi Manish
> 
> Do you need the degree versions for Sphinx though? To clarify that last 
> sentence from the previous email - Thinking Sphinx will automatically detect 
> relevant attributes for geodist calculations based on name - and so, if you 
> have attributes that are called 'lat' and 'lng' which are not the radians 
> versions, then it'll use them over ones named 'latitude' and 'longitude'.
> 
> Granted, you've got them the other way around in this case, so it should be 
> okay, but I think it's better to avoid the confusion completely if possible.
> 
> Cheers
> 
> -- 
> Pat
> 
> On 10/10/2011, at 11:31 PM, Manish M. Shah wrote:
> 
>> Pat...
>> 
>> Thanks for replying. That makes sense why it gives warnings. :)
>> 
>> Reason for non-radians is I'm also using Multi-Geocoder for some stuff, 
>> which uses degrees - so there's some conversion work being done between the 
>> two.
>> 
>> I don't under stand the last sentence though : "TS may also get confused 
>> when both latitude/longitude and lat/lng exist, so better to just have a 
>> single pair and work with that." Can you elaborate?
>> 
>> Manish
>> 
>> 
>> On Oct 10, 2011, at 12:41 AM, Pat Allan wrote:
>> 
>>> I think this is because you're duplicating attribute names - they should be 
>>> unique.
>>> 
>>> I wouldn't think there's much point in having the non-radians version, but 
>>> that's up to you. TS may also get confused when both latitude/longitude and 
>>> lat/lng exist, so better to just have a single pair and work with that.
>>> 
>>> -- 
>>> Pat
>>> 
>>> On 09/10/2011, at 11:32 AM, mrmanishs wrote:
>>> 
>>>> So,
>>>> 
>>>> In my model, when I have:
>>>> 
>>>> define_index do
>>>> has latitude, longitude
>>>> has "RADIANS(latitude)",  :as => :latitude,  :type => :float
>>>> has "RADIANS(longitude)", :as => :longitude, :type => :float
>>>> end
>>>> 
>>>> The indexer throws warnings:
>>>> 
>>>> WARNING: attribute 'latitude' not found - IGNORING
>>>> WARNING: attribute 'longitude' not found - IGNORING
>>>> 
>>>> However, when I do:
>>>> 
>>>> define_index do
>>>> has latitude, longitude
>>>> has "RADIANS(latitude)",  :as => :lat,  :type => :float
>>>> has "RADIANS(longitude)", :as => :lng, :type => :float
>>>> end
>>>> 
>>>> No warnings show up.
>>>> 
>>>> Also, the second one seems to work correctly with .each_with_geodist,
>>>> but first one does not. Any idea why?
>>>> 
>>>> -- 
>>>> 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.
>>>> 
>>> 
>>> -- 
>>> 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.
>> 
>> -- 
>> 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.
>> 
> 
> -- 
> 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.
> 

-- 
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