Does the ReplaceAllObjects method automatically cretes batches?


I am looking for the c# search client apis for index management, and I want to clear the existing data and then add a new set of data to the index.

I found there are two sets of apis:

  • ClearObjects and SaveObjects
  • ReplaceAllObjects

I can see from the SaveObjects api documentation, it mentioned the automatically batches feature:

Using this method automatically chunks your records into batches of 1,000 objects, for performance reasons. If you’re indexing many records, and on a stable, high-speed Internet connection, you may want to override the default batch size with a higher value, letting you send more records per request and shortening your indexing time.

With the ReplaceAllObjects, it does atomic reindex, which is my preferred way.
But in the documentation page, I didn’t see the automatically batches function mentioned, can you please help to confirm this?



ReplaceAllObjects only work in batch so it is indeed not mentioned but implicit.
You need to send all objects at once because it creates a new index, contrary to saveObjects that only upsert in the same index.

Hope this answer your question