def refresh(self):
        """ Sends a "refresh" to the ES index, forcing the actual indexing of what was sent up until now """

        if not self.connected:
            return

        if config["ENV"] not in ("local", "ci"):
            raise Exception("refresh() not allowed in env %s" % config["ENV"])

        self.indices().refresh(index=self.index_name)