﻿var mongoose = require("mongoose");
var Schema = mongoose.Schema;

var StorySchema = new Schema({
    id: { type: String },
    date: { type: String },
    read: { type: Boolean, default: false },
    content: { type: String },
});

StorySchema.index({ id: 1 }, { unique: true });

module.exports = mongoose.model("Story", StorySchema);

@@ -274,16 +274,80 @@
 true %7D);
+%0AStorySchema.index(%7B date: 1 %7D);%0AStorySchema.index(%7B read: 1 %7D);
 %0A%0Amodule

update indexes