def generate_index(self):
        # Reset the index as we are regenerating it from scratch
        self.document_index.drop_collection()
        # Add an index entry for each document
        for doc in self.get_queryset(self.document):
            self.add_to_index(doc)
Generate the index for the indexed collection. This will remove any
dataset/ETHPy150Open hmarr/mongosearch/mongosearch.py/SearchIndex.generate_index