Added capabilty to pass an array of words and index them.
Fixed an issue that causes the doc list to have duplicate entries(i.e
D0: 1, D0: 1) while it should be (D0: 2)