updated for elastics_in_batches and elastics_action