Code refactor for metadata structure change;
Merge pull request #141 from shaofengshi/inverted-index

Code refactor for metadata structure change;