code: def _get_document_data(database, document):
          
          try:
              return document.get_data()
          except xapian.DatabaseModifiedError:
              database.reopen()
              return document.get_data()
docs: A safer version of Xapian.document.get_data
  
          Simply wraps the Xapian version and catches any `Xapian.DatabaseModifiedError`,
          attempting a `database.reopen` as needed.
  
          Required arguments:
              `database` -- The database to be read
              `document` -- An instance of an Xapian.document object