Skip to main content
Required ACL: addObject This helper method uses the Batch operations on one index operation. It builds a batch request with either the partialUpdateObject or partialUpdateObjectNoCreate action, depending on whether createIfNotExists is true or false. The method sends records in batches of up to 1,000. This operation is subject to indexing rate limits.

Usage

var response = await client.PartialUpdateObjectsAsync(
  "ALGOLIA_INDEX_NAME",
  new List<Object>
  {
    new Dictionary<string, string> { { "objectID", "1" }, { "name", "Adam" } },
    new Dictionary<string, string> { { "objectID", "2" }, { "name", "Benoit" } },
  },
  true
);

Parameters

  • C#
  • Go
  • Java
  • JavaScript
  • Kotlin
  • PHP
  • Python
  • Ruby
  • Scala
  • Swift
indexName
string
required
Name of the index to update records in.
objects
IEnumerable<T>
required
Records to update.
T
Type parameter
required
The model of your index’s records.
createIfNotExists
bool
required
Whether to add new records to the index if they don’t exist yet.
waitForTasks
bool
default:false
Whether to wait until all batch requests are done.
cancellationToken
CancellationToken
default:"default"
Parameter that can be used as a signal to cancel this request.
I