PHOENIX-933 Local index support to Phoenix

Thanks for pointing this James. Yes merge sort is fine. Done the changes locally.