1602/jugglingdb — pull request #109 by imothee (2012-08-14 06:34:32+00:00)
Title: Adds ensureIndex call to mongoose schema define function.

Schemas with index:true in the properties will now call ensureIndex on
app load when using the mongoose adapter.

There may be a more efficient way to deal with this (and it doesn't support combined indexes) but at least it will index all the fields defined in the jugglingdb schema.

Post = define 'Post', ->
property 'title', String, index: true
property 'content', String, index: true
property 'keywords', String, index: true

Feel free to take the general idea and re-implement in a nicer more jugglingdb way!

Cheers,

imothee