def bulk_index(self):
        """ Indexes the current buffer to Elasticsearch, bypassing the bulk() helper for performance """

        connection = self.client.transport.get_connection()

        bulk_url = "/%s/page/_bulk" % self.index_name

        body = "".join(self.buffer)

        # TODO retries
        # status, headers, data
        status, _, _ = connection.perform_request("POST", bulk_url, body=body)

        if status != 200:
            raise Exception("Elasticsearch returned status=%s" % status)

        # TODO: look for errors there?
        # parsed = json.loads(data)