def replace_all_rules!(rules, request_options = {})
      res = replace_all_rules(rules, request_options)
      wait_task(res['taskID'], WAIT_TASK_DEFAULT_TIME_BEFORE_RETRY, request_options)
      res
    end
def replace_all_rules!(rules, request_options = {})
      res = replace_all_rules(rules, request_options)
      wait_task(res['taskID'], WAIT_TASK_DEFAULT_TIME_BEFORE_RETRY, request_options)
      res
    end
Replace rules in the index by the given array of rules and wait the end of indexing

 @param rules the array of rules to add
 @param request_options contains extra parameters to send with your query