How to best manage _tmp indices?

My Algolia index is being updated several times per day with replaceAllObjects. As a result, there are many _tmp indices in my account.

Should I be deleting _tmp indices after replaceAllObjects is run or will they auto-delete on their own after some time?

That method should clean up the temp directory after it completes. Is there a chance the method is occasionally failing or timing out? That would be one reason you’d still see a tmp_ index.

That’s probably it, but I’m not too sure. Just to be safe, I added a couple of lines in my script to delete any _tmp indices before running replaceAllObjects.

1 Like