PHOENIX-933 Local index support to Phoenix

Updated pull request after resolving conflicts and handling James review comments.
Let's discuss in a separate JIRA. It's not a big deal.