def update_ids(self, docids):
logger.info("<STR_LIT>" % len(docids))<EOL>for docid in docids:<EOL><INDENT>if docid is not None:<EOL><INDENT>pos = self.id2pos.get(docid, None)<EOL>if pos is not None:<EOL><INDENT>logger.info("<STR_LIT>" % (docid, self))<EOL>del self.pos2id[pos]<EOL><DEDENT>self.id2pos[docid] = self.length<EOL>try:<EOL><INDENT>del self.id2sims[docid]<EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>self.length += <NUM_LIT:1><EOL><DEDENT>self.id2sims.sync()<EOL>self.update_mappings()<EOL>
Update id->pos mapping with new document ids.