Generate inverted index.

Signed-off-by: CyberZHG <cyberzhg@gmail.com>