Added ability to retrieve documents from index