TopKIndex.replaceInIndex has incorrect return value in callback

Change-Id: Iba28ce835ca17869bee77ab937ad1d52c52e8c88
Merge "TopKIndex.replaceInIndex has incorrect return value in callback"