Ah, geodist is a float attribute, so try adding a .0 to the end of each of the
range values so they're not integers.
But I'm guessing the difference is caused by different versions of Sphinx.
--
Pat
On 17/03/2012, at 8:49 PM, patrick99e99 wrote:
>> Is that the entire query? If so, I'm surprised it works at all - the
>> @geodist attribute only exists when you supply a lat/lng pair, which you
>> don't seem to be doing…
>
> Right, that makes sense-- but supplying a lat/lng doesn't help... on
> my local machine:
>
>> Post.facets({:with => { :@geodist => 1000000 }, :geo =>
>> [0.43501347763859316, -1.4072239209450015] }).for.count
> Sphinx Query (2.6ms)
> Sphinx Found 0 results
> Sphinx Sphinx Daemon returned warning: index post_core: unsupported
> filter type 'intvalues' on float column
> => 0
>
> ... On my staging slice (with an identical db):
> Post.facets({:with => { :@geodist => 1000000 }, :geo =>
> [0.43501347763859316, -1.4072239209450015] }).for.count
> Sphinx Query (5.5ms)
> Sphinx Found 389 results
> Post Load (0.2ms) SELECT `posts`.* FROM `posts` WHERE `posts`.`id`
> IN (27, 30, 41, 42, 43, 89, 95, 96, 98, 99, 109, 110, 111, 112, 113,
> 114, 116, 117, 118, 119) ORDER BY created_at DESC
> => 20
>
> I updated my gist to include my models define_index block...
> https://gist.github.com/02a03a3ee7fba1877e02
>
> Any ideas why the behavior is so different between these two boxes?
>
> -patrick
>
> --
> 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.