def insert_file(self, f, namespace, timestamp):
        """Inserts a file to the doc dict.
        """
        doc = f.get_metadata()
        doc["content"] = f.read()
        self.doc_dict[f._id] = Entry(doc=doc, ns=namespace, ts=timestamp)