add index to be able to sort on documents