HIve's indexing related patches (Jira Hive-417) [ Commited to trunk ]