Via http://pocoproject.org/forum/viewtopic.php?f=12&t=6384 In your implementation of ensureIndex() you insert the document twice. Can you recall why that was necessary?