On 7/18/06, Jordan Frank <[EMAIL PROTECTED]> wrote:
>
> Well, because I am a fool, and did not notice this class that seems to
> be exactly what I need.
>
> --
> Cheers,
> Jordan Frank
> [EMAIL PROTECTED]
>

Actually, I spoke too soon. It appears that this class has the same
problem with negative numbers. For example:

>> Person.search("latitude_string:[00000000000000 0000000000nesr]").length
=> 7
>> Person.search("latitude_string:[-1y2p0ij321x6p 0000000000nesr]").length
=> 0

I've expanded my range, so shouldn't the number of results be at least
what it was with all 0's? I've tried with quotes too, and it doesn't
help. Again though, if I do the following (note the quotes):

>> Person.search("latitude_string:(> '-1y2p0ij321x6p' AND <
0000000000nesr").length
=> 7

It works...

So what i've done, is because I'm only working with longitudes and
latitudes, which are guaranteed to lie between -500 and 500, I'm just
adding 500 to them, to make them all positive, and then I can use the
range queries...and I wrote my own little number to string thing,
since I'm working with small values. But nevertheless I thank you for
your help.

-- 
Cheers,
Jordan Frank
[EMAIL PROTECTED]
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to