0
문서를 읽었지만 예상대로 작동하지 않습니다. 나는 다음과 같은 문서가 있습니다화합물 2dsphere 지수를 어떻게 보장할까요?
{
"_id" : ObjectId("5396e85c12f43f5d1bafbd13"),
"author" : ObjectId("5396ca2b0fe95cf96599d881"),
"location" : {
"address" : "An address",
"coordinates" : [
12.52891929999998,
16.620259
],
"type" : "Point",
"postal_code" : "333",
"country" : "Country",
},
"description" : "aDescription"
}
을 그리고 몽고에 다음 인덱스가 :
{
"location" : "2dsphere"
}
가 어떻게 복합 인덱스를 만들 수 있습니까?
db.articles.ensureIndex({ location : "2dsphere", postal_code:1, country:1, address:1 })
는 우편 _ 번호 무엇 않습니다 : 1 또는 -1 의미 는 올바른 다음인가?