From b3834c525a9e95aa3702c9efc5f03377fea9a838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E7=BA=A2=E4=BF=9D?= Date: Sun, 10 Jan 2021 10:22:57 +0800 Subject: [PATCH] add department_id index --- collection/uni-id-users/collection.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/collection/uni-id-users/collection.json b/collection/uni-id-users/collection.json index 073c8f2..5fb09ad 100644 --- a/collection/uni-id-users/collection.json +++ b/collection/uni-id-users/collection.json @@ -111,7 +111,7 @@ "trim":"both" }, "department_id": { - "bsonType": "string", + "bsonType": "array", "description": "部门ID", "title": "部门", "enumType": "tree", @@ -371,6 +371,16 @@ }], "MgoIsUnique": false } - } + }, + { + "IndexName": "department", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "department_id", + "Direction": "1" + }], + "MgoIsUnique": false + } + } ] }