Create an index with MongoDb

前端 未结 5 1727
春和景丽
春和景丽 2021-02-13 03:20

I\'m beginner with MongoDB and i\'m trying some stuff. I want to store URL and to avoid duplicate URL I create an unique index on the url. Like that

collection.c         


        
5条回答
  •  情话喂你
    2021-02-13 04:26

    Also I see that you dont have a collection name specified in getCollection();

    What collection would that select? curious

提交回复
热议问题