-
-
Save jeffyuhaoliu/6486879 to your computer and use it in GitHub Desktop.
Node.js MongoDB HW#4.3 - This array shows the indexes that were created to answer HW#4.3. Note: To create an index, run the following command... db.posts.ensureIndex({date: -1})
db.posts.ensureIndex({tags: 1, date: -1})
db.posts.ensureIndex({permalink: 1})
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"v" : 1, | |
"key" : { | |
"_id" : 1 | |
}, | |
"ns" : "blog.posts", | |
"name" : "_id_" | |
}, | |
{ | |
"v" : 1, | |
"key" : { | |
"date" : -1 | |
}, | |
"ns" : "blog.posts", | |
"name" : "date_-1" | |
}, | |
{ | |
"v" : 1, | |
"key" : { | |
"tags" : 1, | |
"date" : -1 | |
}, | |
"ns" : "blog.posts", | |
"name" : "tags_1_date_-1" | |
}, | |
{ | |
"v" : 1, | |
"key" : { | |
"permalink" : 1 | |
}, | |
"ns" : "blog.posts", | |
"name" : "permalink_1" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment