fix bugs in ensureIndex of PartitionedCollection