def batch_rules!(rules, forward_to_replicas = false, clear_existing_rules = false, request_options = {})
      res = batch_rules(rules, forward_to_replicas, clear_existing_rules, request_options)
      wait_task(res['taskID'], WAIT_TASK_DEFAULT_TIME_BEFORE_RETRY, request_options)
      return res
    end
def batch_rules!(rules, forward_to_replicas = false, clear_existing_rules = false, request_options = {})
      res = batch_rules(rules, forward_to_replicas, clear_existing_rules, request_options)
      wait_task(res['taskID'], WAIT_TASK_DEFAULT_TIME_BEFORE_RETRY, request_options)
      return res
    end
Add/Update an array of rules and wait the end of indexing

 @param rules the array of rules to add/update
 @param forward_to_replicas should we forward the delete to replica indices
 @param clear_existing_rules should we clear the existing rules before adding the new ones
 @param request_options contains extra parameters to send with your query