@wrap_exceptions<EOL><INDENT>def get_last_doc(self):<DEDENT>
try:<EOL><INDENT>result = self.elastic.search(<EOL>index=self.meta_index_name,<EOL>body={<EOL>"<STR_LIT>": {"<STR_LIT>": {}},<EOL>"<STR_LIT>": [{"<STR_LIT>": "<STR_LIT>"}],<EOL>},<EOL>size=<NUM_LIT:1><EOL>)["<STR_LIT>"]["<STR_LIT>"]<EOL>for r in result:<EOL><INDENT>r['<STR_LIT>']['<STR_LIT>'] = r['<STR_LIT>']<EOL>return r['<STR_LIT>']<EOL><DEDENT><DEDENT>except es_exceptions.RequestError:<EOL><INDENT>return None<EOL><DEDENT>
Get the most recently modified document from Elasticsearch.

        This method is used to help define a time window within which documents
        may be in conflict after a MongoDB rollback.