Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is a slug in mongoDB

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Referring to the mongoDB in Action book...



What is a slug in the above document? It sounds like a unique Id. But how do I ensure uniqueness with a slug field when say I have around a million documents?
 
Viktor Kubinec
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Harry wrote:Referring to the mongoDB in Action book...



What is a slug in the above document? It sounds like a unique Id. But how do I ensure uniqueness with a slug field when say I have around a million documents?


I think it is just a field in the json document just like sku,name,description... If you want to make a field unique you can create unique index on that field.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic