extract getIndexByInfiniteIndex