rules = [rule1, rule2]# Save the Rules.index.batch_rules(rules)# Save the Rules and wait the end of indexing.index.batch_rules!(rules)# Replace all the rules in the index by the provided ones.index.batch_rules(rules, {forwardToReplicas: true, clearExistingRules: true})
client.execute { save rules Seq(rule1, rule2) inIndex "index_name"}
let rules: [Rule] = [/* Your Query rules */]index.saveRules(rules, forwardToReplicas: true, clearExistingRules: true) { result in if case .success(let response) = result { print("Response: \(response)") }}
This section shows the JSON response returned by the API.
Each API client wraps this response in language-specific objects, so the structure may vary.
To view the response, use the getLogs method.
Don’t rely on the order of properties—JSON objects don’t preserve key order.