code: def increment_download_count(self, id, attachmentID, doc_type='book'):
          '''
          Increment the download counter of a specific file
          '''
          body = self.es.get(index=self.index_name, id=id, doc_type='book', _source_include='_attachments')['_source']
  
          for attachment in body['_attachments']:
              if attachment['id'] == attachmentID:
                  attachment['download_count'] += 1
                  self.es.update(index=self.index_name,
                                 id=id,
                                 doc_type=doc_type,
                                 body={"doc": {'_attachments': body['_attachments']}})
                  return
          raise NotFoundError("No attachment could be found with id: {}".format(attachmentID)f increment_download_count(self, id, attachmentID, doc_type='book'):
          '''
          Increment the download counter of a specific file
          '''
          body = self.es.get(index=self.index_name, id=id, doc_type='book', _source_include='_attachments')['_source']
  
          for attachment in body['_attachments']:
              if attachment['id'] == attachmentID:
                  attachment['download_count'] += 1
                  self.es.update(index=self.index_name,
                                 id=id,
                                 doc_type=doc_type,
                                 body={"doc": {'_attachments': body['_attachments']}})
                  return
          raise NotFoundError("No attachment could be found with id: {}".format(attachmentID))
docs: Increment the download counter of a specific file