diff --git a/modules/arena/modelarena.go b/modules/arena/modelarena.go index f3ad95317..34d497be1 100644 --- a/modules/arena/modelarena.go +++ b/modules/arena/modelarena.go @@ -38,7 +38,7 @@ func (this *modelArena) Init(service core.IService, module core.IModule, comp co bsonx.Doc{ {Key: "uid", Value: bsonx.Int32(1)}, }, - bson.M{"loc": "2d"}, + bson.M{"loc": "2dsphere"}, }, }) return diff --git a/sys/db/init_test.go b/sys/db/init_test.go index 1ccc3f1b1..e17c8349a 100644 --- a/sys/db/init_test.go +++ b/sys/db/init_test.go @@ -48,7 +48,7 @@ func Test_2D(t *testing.T) { port := []float64{2, float64(rand.Int31n(100)) / 1000.0} fmt.Printf("port:%v \n", port) if cursor, err := sys.Find(comm.TableArena, bson.M{ - // "dan": 2, + "dan": 2, // "loc": bson.M{ // "$geoWithin": bson.M{ // "$center": bson.A{port, 100},