I was having issues with geoqueries.
Under go 1.2.1, it worked fine.
Under go 1.3 tip, it worked fine most of the time.
Some of the time (1/20th of the time?), iter.Query returned an error like this:
geo values have to be numbers :: caused by :: { 0: 0.0007853538928210314, 1: [ -122.253685, 37.537502 ] }
The fix turned out to switch to bson.D instead of bson.M. This didn't seem to matter at all under go 1.2.1, but breaks some of the time under 1.3
e.g. switch from
q := bson.M{
"where": bson.M{
"$nearSphere": []float64{lng, lat},
"$maxDistance": distance,
},
}
to
q := bson.M{
"where": bson.D{
{"$nearSphere", []float64{lng, lat}},
{"$maxDistance", distance},
},
}