update: opendb-china-cities 增加字段type, letter、pinyin、zip_code,同步数据支持,增加索引

This commit is contained in:
handongxun 2020-12-19 14:25:40 +08:00
parent c1bdb66baf
commit 4e3a6696f5
2 changed files with 82 additions and 3 deletions

View File

@ -13,13 +13,92 @@
},
"name": {
"bsonType": "string",
"description": "名称"
"description": "城市名称",
"title": "城市"
},
"type": {
"bsonType": "int",
"description": "城市类型0省1市2区"
},
"letter": {
"bsonType": "string",
"description": "拼音首字母"
},
"pinyin": {
"bsonType": "string",
"description": "城市名称的完整汉语拼音,用于拼音检索"
},
"parent_code": {
"bsonType": "string",
"description": "父级编码"
},
"zip_code": {
"bsonType": "string",
"description": "邮政编码",
"title": "邮编"
}
}
},
"index": []
"index": [
{
"IndexName": "code_",
"MgoKeySchema": {
"MgoIndexKeys": [{
"Name": "code",
"Direction": "1"
}],
"MgoIsUnique": true
}
},
{
"IndexName": "name",
"MgoKeySchema": {
"MgoIndexKeys": [{
"Name": "name",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "letter",
"MgoKeySchema": {
"MgoIndexKeys": [{
"Name": "letter",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "pinyin",
"MgoKeySchema": {
"MgoIndexKeys": [{
"Name": "name",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "parent_code",
"MgoKeySchema": {
"MgoIndexKeys": [{
"Name": "parent_code",
"Direction": "1"
}],
"MgoIsUnique": false
}
},
{
"IndexName": "zip_code",
"MgoKeySchema": {
"MgoIndexKeys": [{
"Name": "zip_code",
"Direction": "1"
}],
"MgoIsUnique": false
}
}
]
}

File diff suppressed because one or more lines are too long