Correctly implementing re-indexing for Indexing API