implemented metric inverted index (note that currently it doesn't support the maximum position difference feature)