Wrap lucene updates with a lock