@gensim.utils.synchronous('<STR_LIT>')<EOL><INDENT>def optimize(self):<DEDENT>
self.check_session()<EOL>result = self.session.optimize()<EOL>if self.autosession:<EOL><INDENT>self.commit()<EOL><DEDENT>return result<EOL>
Optimize index for faster by-document-id queries.