build indexing method based on leveldb (but not run)