Ticket #330 (accepted enhancement)

Opened 13 years ago

Last modified 13 years ago

Unable to create unique indices

Reported by: anurag@… Owned by: jaymccarthy
Priority: major Milestone:
Component: jaymccarthy/mongodb.plt Keywords:
Cc: Version: (1 8)
Racket Version:


mongo ensureIndex requires two documents when creating unique indices. The current interface seems to only provide for one.

i.e, db.things.ensureIndex({x : 1}, {unique : true}) does not seem to have a mongo equivalent

Change History

Changed 13 years ago by jaymccarthy

  • status changed from new to accepted

When I made the package, Mongo didn't support sparse or unique indices. I'll commit a patch you provide that adds #:sparse? or #:unique? to the index function. If you don't want to do that, you can just submit the right command dictionary with the normal functions.

Note: See TracTickets for help on using tickets.