Ana Sayfa / MongoDB / MongoDB 2dsphere Index

MongoDB 2dsphere Index

Create a 2dsphere Index

db.collection.createIndex() method is used to create a 2dsphere index. The blueprint of a 2dsphere index :

db.collection.createIndex( { <location field> : "2dsphere" } )

Here, the location field is the key and 2dsphere is the type of the index. In the following example we are going to create a 2dsphre index in the places collection.

db.places.createIndex( { loc : “2dsphere” } )

The following operation will create 2dsphere index on the loc field of places collection.

db.places.createIndex( { loc : “2dsphere” } )

Bunada Göz Atın

Python Bitwise Operators

Bitwise operations alter binary strings at the bit level. These operations are incredibly basic and …

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir