inverted index with nodejs