Speed-up bulk indexing calls

See commit messages for details - this makes the action lines shorter and avoids some per document JSON encoding, if no explicit ids are provided.