set find shortest index to look for small values rather than large ones.