Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-546

ensureIndex not working with Java driver.

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Documentation
    • Environment:
      Windows 7

      Hi, I am trying to use ensureIndex for my collection using Java Driver of MongoDB. I want to have an unique index to be placed on my collection. I have used usercollection.ensureIndex(new BasicDBObject("id", 1).append("unique", true));. Please help me with the correct code to be used.

            Assignee:
            Unassigned Unassigned
            Reporter:
            prudhvi70 prudhvi chaganti
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: