diff --git a/pkg/schema/field/location.go b/pkg/schema/field/location.go index eb6e175552a2504b667658c8b227bc3b7ff661b8..d89b3206d091971a123e8842330f4b850838ccdf 100644 --- a/pkg/schema/field/location.go +++ b/pkg/schema/field/location.go @@ -8,7 +8,6 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/x/bsonx" ) var locationType = &LocationType{} @@ -32,8 +31,8 @@ func (p LocationParameters) GetMongoIndexes(path string, f *Field) []mongo.Index } if f.Indexed { - add.Keys = bsonx.Doc{{Key: a, Value: bsonx.Int32(1)}} - geo.Keys = bsonx.Doc{{Key: g, Value: bsonx.String("2dsphere")}} + add.Keys = bson.D{{Key: a, Value: 1}} + geo.Keys = bson.D{{Key: g, Value: "2dsphere"}} } return []mongo.IndexModel{add, geo} }