How many threads are you using? Adjust and increase thread size according to your cpu core count. Don't commit for each document. Call commit every 1000 docs for instance.