marcesher/cfmongodb — Issue #24: Geo queries fails with maxDistance
Author: jdaury
Created: 2012-02-29 15:15:47+00:00
State: open

Geoqueries like $near and $nearSphere often fails if $maxDistance is specified, returning the following error:

-- geo values have to be numbers: { $maxDistance: 0.00391972405142678, $nearSphere: [ 45.46427, 9.18951 ] }

this geo query is order sentisive and maxDistance should not precede nearSphere

the following query returns the correct results
'Position' : { $nearSphere: [ 45.46427, 9.18951 ] ,$maxDistance: 0.00391972405142678}