code: def cancel(self):
          
          try:
              self.post("control", action="cancel")
          except HTTPError as he:
              if he.status == 404:
                  # The job has already been cancelled, so
                  # cancelling it twice is a nop.
                  pass
              else:
                  raise
          return self
docs: Stops the current search and deletes the results cache.
  
          :return: The :class:`Job`.