Is Algolia Index updated when partialUpdateObject method returns?

I am using node client of Algolia and in my case I need to update an attribute in around 30,000 to 40,000 records.
I batch them up and send to call partialUpdateObject
Now when this method returns with the objectIDs of all the updated records. I need to perform another operation on this index

Now my questions are

  1. Does partialUpdateObject returns only when the index has been updated or it just submits the request in the queue

  2. If the ans for first is it updates the index then returns which is my current assumption as well then any subsequent operations say 01,02,03 will work on the updated state of the index from the previous operation

Hi,

When you send an indexing operation, as you said “it just submits the request in the queue”. Indexing is asynchronous so if you need to know when a particular update has been processed and indexed, you need to use wait task.

That being said, the engine guarantees the order of processing so if you have sent your update and Algolia returned a 200, then you can send the next batch of updates even if the previous one hasn’t been processed yet - it will simply be added to the end of the queue. However, it is not impossible to have operations interleaved in case they are sent in a short time span and there is a technical issue (network slowness, Algolia machines desync…etc.) – but this is very rare and can be prevented with the use of wait task.