Skip to main content
Based on the Batch operations on one index API operation. This helper method creates a batch write request with the addObject action and automatically sends records in batches of 1,000. This method is subject to indexing rate limits.

Usage

Parameters

indexName
string
required
Name of the index to which to add records.
objects
IEnumerable<T>
required
Records to add.
T
type parameter
required
The model of your index’s records.
waitForTasks
bool
default:false
Whether to wait until all batch requests are done.
batchSize
int
default:1000
Number of records to process in one batch.
requestOptions
RequestOptions
Additional request options.
Last modified on March 11, 2026