title: Python mongodb error with email as unique key
body: <p>I have a collection with Username, Password and Email, so I created a unique index with pymongo in python :</p>
  
  <pre class="lang-py prettyprint-override"><code>import pymongo 
  
  info.create_index( [("Username", pymongo.TEXT), ("Email", pymongo.TEXT)],unique=True)
  </code></pre>
  
  <p>first insert:</p>
  
  <pre><code>mydict = { "Username": "userA","Email": "emailA@example.com"}
  mycol.insert_one(mydict)
  </code></pre>
  
  <p>second insert:</p>
  
  <pre><code>mydict = { "Username": "userB","Email": "emailB@example.com"}
  mycol.insert_one(mydict)
  </code></pre>
  
  <p>But when I test it with a second insert it throws this exception:</p>
  
  <pre><code>pymongo.errors.DuplicateKeyError: E11000 duplicate key error collection: users.info index: Username_text_Email_text dup key: { : "com", : 0.6666666666666666 }
  </code></pre>
  
  <p>am I missing something here?</p>