AlgoliaBatch class
AlgoliaBatch A AlgoliaBatch is a series of write operations to be performed as one unit.
Operations done on a AlgoliaBatch do not take effect until you commit.
Once committed, no further operations can be performed on the AlgoliaBatch, nor can it be committed again.
Creates a write batch, used for performing multiple writes as a single atomic operation.
Perform multiple write operations in a single API call.
In order to reduce the amount of time spent on network round trips, you can perform multiple write operations at once. All operations will be applied in the order they are specified.
Operations you can batch The following actions are supported:
addObject
: Add an object. Equivalent to Add an object without ID.updateObject
: Add or replace an existing object. You must set the objectID attribute to indicate the object to update. Equivalent to Add/update an object by ID.partialUpdateObject
: Partially update an object. You must set the objectID attribute to indicate the object to update. Equivalent to Partially update an object.partialUpdateObjectNoCreate
: Same as partialUpdateObject, except that the object is not created if the object designed by objectID does not exist.deleteObject
: Delete an object. You must set the objectID attribute to indicate the object to delete. Equivalent to Delete an object.delete
: Delete the index. Equivalent to Delete an index.clear
: Remove the index’s content, but keep settings and index- specific API keys untouched. Equivalent to Clear objects.
Properties
Methods
-
addObject(
Map< String, dynamic> data) → void - AddObject
-
clearIndex(
) → void - ClearIndex
-
commit(
) → Future< AlgoliaTask> - Commit
-
deleteIndex(
) → void - DeleteIndex
-
deleteObject(
String objectID) → void - DeleteObject
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
partialUpdateObject(
Map< String, dynamic> data) → void - PartialUpdateObject
-
partialUpdateObjectNoCreate(
Map< String, dynamic> data) → void - ClearIndex
-
toString(
) → String -
A string representation of this object.
inherited
-
updateObject(
Map< String, dynamic> data) → void - UpdateObject
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited