Modified index build to stop after first whitespace