optimize ES reindexing by using bulk (bug 1013874)