def _update_index_setting(self, index_name: str, settings_to_update: dict) -> None:
    update_request_url = f"{self.options['es_url'].rstrip('/')}/{index_name}/_settings/"
    self.logger.debug(f'Calling Elasticsearch API to update the index settings, URL: {update_request_url}')
    update_response = self._http_request(update_request_url, 'PUT', {'Content-Type': 'application/json; charset=utf-8'}, json.dumps(settings_to_update, ensure_ascii=False).encode('utf-8'))
    update_response_data = json.loads(update_response['data'].decode('utf-8'))
    self.logger.debug(f"Response received, status: {update_response['status']}")
    self.logger.debug(f"Response headers: {update_response['headers']}")
    self.logger.debug(f'Response data: {update_response_data}')
    if ((update_response['status'] == 200) and (update_response_data.get('acknowledged', None) is True)):
        self.logger.debug('Index settings updated')
    else:
        error_message = 'Failed to update the index settings'
        self.logger.error(f'{error_message}')
        raise RuntimeError(f'{error_message}')
    return None
def _update_index_setting(self, index_name: str, settings_to_update: dict) -> None:
    update_request_url = f"{self.options['es_url'].rstrip('/')}/{index_name}/_settings/"
    self.logger.debug(f'Calling Elasticsearch API to update the index settings, URL: {update_request_url}')
    update_response = self._http_request(update_request_url, 'PUT', {'Content-Type': 'application/json; charset=utf-8'}, json.dumps(settings_to_update, ensure_ascii=False).encode('utf-8'))
    update_response_data = json.loads(update_response['data'].decode('utf-8'))
    self.logger.debug(f"Response received, status: {update_response['status']}")
    self.logger.debug(f"Response headers: {update_response['headers']}")
    self.logger.debug(f'Response data: {update_response_data}')
    if ((update_response['status'] == 200) and (update_response_data.get('acknowledged', None) is True)):
        self.logger.debug('Index settings updated')
    else:
        error_message = 'Failed to update the index settings'
        self.logger.error(f'{error_message}')
        raise RuntimeError(f'{error_message}')
    return None