Documentation Index
Fetch the complete documentation index at: https://algolia.com/llms.txt
Use this file to discover all available pages before exploring further.
Required ACL: editSettings
To create or update more than one rule, use the batch operation.
Usage
// Initialize the client
var client = new SearchClient(new SearchConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"));
// Call the API
var response = await client.SaveRuleAsync(
"<YOUR_INDEX_NAME>",
"id1",
new Rule
{
ObjectID = "id1",
Conditions = new List<Condition>
{
new Condition { Pattern = "apple", Anchoring = Enum.Parse<Anchoring>("Contains") },
},
Consequence = new Consequence
{
Params = new ConsequenceParams { Filters = "brand:xiaomi" },
},
}
);
// print the response
Console.WriteLine(response);
See the full API reference
For more details about input parameters
and response fields.