Port the rest of IndexWriter