title: sparse indexes and null values in mongo
body: <p>I'm not sure I understand sparse indexes correctly.  </p>
  
  <p>I have a sparse unique index on fbId</p>
  
  <pre><code>{
      "ns" : "mydb.users",
      "key" : {
          "fbId" : 1
      },
      "name" : "fbId_1",
      "unique" : true,
      "sparse" : true,
      "background" : false,
      "v" : 0
  }
  </code></pre>
  
  <p>And I was expecting that would allow me to insert records with null as the fbId, but that throws a duplicate key exception.  It only allows me to insert if the fbId property is removed completely. </p>
  
  <p>Isn't a sparse index supposed to deal with that?</p>