Class to handle the indexing of the documents