def index_documents(self, fresh_docs, model):
docids = list(fresh_docs.keys())<EOL>vectors = (model.docs2vecs(fresh_docs[docid] for docid in docids))<EOL>logger.info("<STR_LIT>" % (len(docids), self))<EOL>self.qindex.add_documents(vectors)<EOL>self.qindex.save()<EOL>self.update_ids(docids)<EOL>
Update fresh index with new documents (potentially replacing old ones with
the same id). `fresh_docs` is a dictionary-like object (=dict, sqlitedict, shelve etc)
that maps document_id->document.