57

Possible Duplicate:
What is the etymology of 'slug'?

In CouchDB definitive guide the author used key "slug" in a document.

{
   "title": "Hello World",
   "slug": "hello_world"
}

What does "slug" mean and why is it used?

Community
  • 1
  • 1
ajsie
  • 70,516
  • 97
  • 259
  • 375

1 Answers1

57

Slug is used to make a name that is not acceptable for various reasons - e.g. containing special characters, too long, mixed-case, etc. - appropriate for the target usage. What target usage means is context dependent, but in general case slug is a more appropriate combination of other fields. In the above case, only one field is used - title.

Have a look at these SOqs, too:

If you are into the origin of the term, see this:

Community
  • 1
  • 1
icyrock.com
  • 25,648
  • 4
  • 58
  • 78