// Initialize the client
client, err := search.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
if err != nil {
// The client can fail to initialize if you pass an invalid parameter.
panic(err)
}
// Call the API
response, err := client.SaveRules(client.NewApiSaveRulesRequest(
"<YOUR_INDEX_NAME>",
[]search.Rule{*search.NewEmptyRule().SetObjectID("a-rule-id").SetConditions(
[]search.Condition{*search.NewEmptyCondition().SetPattern("smartphone").SetAnchoring(search.Anchoring("contains"))}).SetConsequence(
search.NewEmptyConsequence().SetParams(
search.NewEmptyConsequenceParams().SetFilters("brand:apple"))), *search.NewEmptyRule().SetObjectID("a-second-rule-id").SetConditions(
[]search.Condition{*search.NewEmptyCondition().SetPattern("apple").SetAnchoring(search.Anchoring("contains"))}).SetConsequence(
search.NewEmptyConsequence().SetParams(
search.NewEmptyConsequenceParams().SetFilters("brand:samsung")))}).WithForwardToReplicas(false).WithClearExistingRules(true))
if err != nil {
// handle the eventual error
panic(err)
}
// print the response
print(response)
// Initialize the client
SearchClient client = new SearchClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY");
// Call the API
UpdatedAtResponse response = client.saveRules(
"<YOUR_INDEX_NAME>",
Arrays.asList(
new Rule()
.setObjectID("a-rule-id")
.setConditions(Arrays.asList(new Condition().setPattern("smartphone").setAnchoring(Anchoring.CONTAINS)))
.setConsequence(new Consequence().setParams(new ConsequenceParams().setFilters("brand:apple"))),
new Rule()
.setObjectID("a-second-rule-id")
.setConditions(Arrays.asList(new Condition().setPattern("apple").setAnchoring(Anchoring.CONTAINS)))
.setConsequence(new Consequence().setParams(new ConsequenceParams().setFilters("brand:samsung")))
),
false,
true
);
// print the response
System.out.println(response);
// Initialize the client
client, err := search.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
if err != nil {
// The client can fail to initialize if you pass an invalid parameter.
panic(err)
}
// Call the API
response, err := client.SaveRules(client.NewApiSaveRulesRequest(
"<YOUR_INDEX_NAME>",
[]search.Rule{*search.NewEmptyRule().SetObjectID("a-rule-id").SetConditions(
[]search.Condition{*search.NewEmptyCondition().SetPattern("smartphone").SetAnchoring(search.Anchoring("contains"))}).SetConsequence(
search.NewEmptyConsequence().SetParams(
search.NewEmptyConsequenceParams().SetFilters("brand:apple"))), *search.NewEmptyRule().SetObjectID("a-second-rule-id").SetConditions(
[]search.Condition{*search.NewEmptyCondition().SetPattern("apple").SetAnchoring(search.Anchoring("contains"))}).SetConsequence(
search.NewEmptyConsequence().SetParams(
search.NewEmptyConsequenceParams().SetFilters("brand:samsung")))}).WithForwardToReplicas(false).WithClearExistingRules(true))
if err != nil {
// handle the eventual error
panic(err)
}
// print the response
print(response)
// Initialize the client
SearchClient client = new SearchClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY");
// Call the API
UpdatedAtResponse response = client.saveRules(
"<YOUR_INDEX_NAME>",
Arrays.asList(
new Rule()
.setObjectID("a-rule-id")
.setConditions(Arrays.asList(new Condition().setPattern("smartphone").setAnchoring(Anchoring.CONTAINS)))
.setConsequence(new Consequence().setParams(new ConsequenceParams().setFilters("brand:apple"))),
new Rule()
.setObjectID("a-second-rule-id")
.setConditions(Arrays.asList(new Condition().setPattern("apple").setAnchoring(Anchoring.CONTAINS)))
.setConsequence(new Consequence().setParams(new ConsequenceParams().setFilters("brand:samsung")))
),
false,
true
);
// print the response
System.out.println(response);
{
"message": "Invalid Application-Id or API-Key"
}
{
"message": "Invalid Application-Id or API-Key"
}
{
"message": "Invalid Application-Id or API-Key"
}
{
"message": "Invalid Application-Id or API-Key"
}
If a rule with the specified object ID doesn’t exist, Algolia creates a new one.
Otherwise, existing rules are replaced.This operation is subject to indexing rate limits.Required ACL:editSettings
Your Algolia API key with the necessary permissions to make the request.
Permissions are controlled through access control lists (ACL) and access restrictions.
The required ACL to make a request is listed in each endpoint's reference.
Legacy field for a single condition. This field is maintained for backward compatibility
with older rules but should not be used in new implementations.
A successful API response means that a task was added to a queue.
It might not run immediately.
You can check the task's progress with the task operation and this task ID.
Date and time when the object was updated, in RFC 3339 format.
Example:
"2023-07-04T12:49:15Z"
Last modified on March 23, 2026
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Algolia","description":"Build search, discovery, and AI experiences with Algolia. Guides, API references, libraries, UI components, and integrations for your stack.","colors":{"primary":"#3970ff","light":"#3970ff","dark":"#003DFF"},"logo":{"light":"https://mintcdn.com/algolia/kiecJp3hu-WXhj-3/logo/light.svg?fit=max\u0026auto=format\u0026n=kiecJp3hu-WXhj-3\u0026q=85\u0026s=bf613e260ca94c0eb23384e6c0d5c77f","dark":"https://mintcdn.com/algolia/kiecJp3hu-WXhj-3/logo/dark.svg?fit=max\u0026auto=format\u0026n=kiecJp3hu-WXhj-3\u0026q=85\u0026s=31a97f60063c111253c518bc0c638e70","href":"/doc"},"favicon":"https://mintcdn.com/algolia/ApgdWRCFtd9v2oPX/favicon.png?fit=max\u0026auto=format\u0026n=ApgdWRCFtd9v2oPX\u0026q=85\u0026s=91df7c93abadfb122ffc8e0f78cc2dc8","api":{"playground":{"display":"simple"},"examples":{"languages":["curl","csharp","dart","go","java","javascript","kotlin","php","python","ruby","scala","swift"],"autogenerate":false}},"navbar":{"links":[{"href":"https://dashboard.algolia.com/users/sign_in","label":"Log in"}],"primary":{"type":"button","label":"Create account","href":"https://www.algolia.com/users/sign_up"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/algolia","x":"https://twitter.com/algolia","discord":"https://alg.li/discord","youtube":"https://www.youtube.com/channel/UCTNkiq-SO8hay1PRx-it9Cw","website":"https://www.algolia.com"},"links":[{"items":[{"label":"Support","href":"https://support.algolia.com/hc/en-us"},{"label":"Glossary","href":"/doc/glossary"},{"label":"Privacy policy","href":"https://www.algolia.com/policies/privacy"},{"label":"Cookie settings","href":"https://www.algolia.com"}]}]},"seo":{"metatags":{"canonical":"https://www.algolia.com"},"organization":{"id":"https://www.algolia.com/#organization","name":"Algolia","url":"https://www.algolia.com","sameAs":["https://www.linkedin.com/company/algolia/","https://github.com/algolia","https://x.com/algolia","https://www.youtube.com/channel/UCTNkiq-SO8hay1PRx-it9Cw"]}},"fonts":{"heading":{"family":"Sora"}},"icons":{"library":"lucide"},"styling":{"eyebrows":"section","codeblocks":"system","latex":true},"integrations":{"segment":{"key":"cKQbv9nMHIUgdWswDLG0c3UdiUgBaUmA"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"algolia","hasAudioNarration":false,"actualSubdomain":"algolia","customDomains":["www.algolia.com"],"gitSource":{"type":"github","owner":"algolia","repo":"docs-new","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af5c625483e41d0aa573dc2","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Libraries and tools","count":618},{"language":"default","tag":"Guides","count":584},{"language":"default","tag":"API clients","count":407},{"language":"default","tag":"Search and Discovery platform","count":406},{"language":"default","tag":"API reference","count":403},{"language":"default","tag":"UI libraries","count":290},{"language":"default","tag":"Reference","count":282},{"language":"default","tag":"Build Search UI","count":235},{"language":"default","tag":"Search","count":187},{"language":"default","tag":"React InstantSearch","count":169}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":":root{--radius: 0.5rem;--rounded-2xl: var(--radius);--rounded-xl: var(--radius);--rounded-lg: var(--radius);--rounded-md: var(--radius);--rounded-full: var(--radius);--icon-stroke: #000000;--border-color: rgb(var(--gray-200) / 0.5);--font-weight-headings-custom: 700;--docsearch-background-color: #f5f6f7;--filters-token-string-color: #b46900;--filters-token-error-color: #d7263d;--filters-token-paren-color: #005cc5;--filters-token-num-color: #6f42c1;--filters-token-operator-color: #22863a;--docsearch-sidepanel-border: var(--border-color);--docsearch-sidepanel-background: rgb(244, 246, 250);--docsearch-sidepanel-background-dark: #fff;--docsearch-hit-background-muted: rgb(247, 247, 248);--docsearch-searchbox-focus-background: #fff}:root.dark,html[data-theme=dark]{--icon-stroke: #ffffff;--border-color: rgb(var(--gray-900) / 0.8);--docsearch-background-color: #0a0b11 !important;--docsearch-dropdown-menu-background: #10121e;--docsearch-dropdown-menu-item-hover-background: #0a0b11;--docsearch-hit-color: #e5e7eb;--filters-token-string-color: #ffa657;--filters-token-error-color: #ff6b6b;--filters-token-paren-color: #79c0ff;--filters-token-num-color: #d2a8ff;--filters-token-operator-color: #7ee787;--docsearch-sidepanel-background: rgb(15, 17, 23);--docsearch-sidepanel-background-dark: rgba(11, 13, 17, 1);--docsearch-hit-background-muted: rgb(14, 17, 23);--docsearch-modal-background: #0a0b11;--docsearch-hit-focus-background: rgb(var(--gray-900))}.rounded-\\[0\\.85rem\\]{border-radius:var(--radius)}#banner{background-color:#23263b}#banner a{color:inherit}#background-div{background-color:#f6f6fa}.dark #background-div{background-color:#ffffff;opacity:0.03}#pagination{display:none}.background-lines{fill:#c5c9e0}.dark .background-lines{fill:#ffffff;fill-opacity:0.15}th{text-align:left}.tooltip{user-select:text}.prose a{font-weight:inherit}.prose a strong{font-weight:600}.katex-display>.katex{overflow-y:hidden}.prose a.link[href^=\"http\"]:not([href^=\"https://www.algolia.com/doc\"]){white-space:nowrap}.prose a.link[href^=\"http\"]:not([href^=\"https://www.algolia.com/doc\"])::after{display:inline-block;width:14px;height:14px;margin-left:4px;vertical-align:-2px;content:\"\";background-color:currentColor;-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E\u003cpath d='M15 3h6v6'/%3E\u003cpath d='M10 14 21 3'/%3E\u003cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E\") center / contain no-repeat;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E\u003cpath d='M15 3h6v6'/%3E\u003cpath d='M10 14 21 3'/%3E\u003cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E\") center / contain no-repeat}.prose h2 code,.prose h3 code,.prose h4 code{font-weight:700}.prose table a code{word-break:keep-all}[data-component-part=\"field-content\"]{margin-left:1.5rem}[data-component-part=\"code-block-root\"]{border-radius:var(--radius)}#content-area img{margin-inline:auto;background:transparent!important}#content-area img:not(.no-shadow){box-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1),\n 0 4px 6px -4px rgb(0 0 0 / 0.1)}#content-area video{margin-inline:auto}.video-embed{display:block;width:100%;min-width:0;max-width:var(--video-embed-max-width, 644px);aspect-ratio:16 / 9;height:auto;margin-inline:auto}button+div[aria-hidden=\"true\"]{background-color:#23263b;border-radius:var(--radius);box-shadow:0 0 0 1px #23263b0d, 0 4px 8px -2px #23263b40;color:#fff;padding:.5rem .75rem}#feedback-toolbar button{border-radius:var(--radius)}html.no-overflow{overflow:hidden}body.DocSearch--active{overflow:initial!important}.DocSearch-Container{visibility:hidden;opacity:0;transition:opacity 120ms ease;padding-top:5vh;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.1);display:flex;align-items:flex-start;justify-content:center;z-index:200;cursor:initial}.DocSearch-Container.docsearch-ready{visibility:visible;opacity:1}.dark .DocSearch-Form,.dark .DocSearch-SearchBar{background-color:transparent!important}.DocSearch-Dropdown{border-top:1px solid var(--docsearch-subtle-color);scrollbar-color:#9698c3 #f5f6f7;scrollbar-width:thin}.dark .DocSearch-Container{--docsearch-text-color: #c4c7dc}.dark .DocSearch-Dropdown{scrollbar-color:#7f8497 #15172a}.dark .DocSearch-Close{color:#5172FF}.dark .DocSearch-Close svg{color:#5172FF}.dark .DocSearch-MagnifierLabel svg{color:#5172FF}.DocSearch-SidepanelButton.floating{display:none}.dark .DocSearch-Dropdown{border-color:#212139}.dark .DocSearch-Divider{border-color:#212139}.dark .DocSearch-Input{color:white;caret-color:white}.dark .DocSearch-Container{background-color:rgba(0, 0, 0, 0.6)!important}.dark .DocSearch-SearchBar,.dark .DocSearch-Form,.dark .DocSearch-Input{color:#ffffff!important}.dark .DocSearch-Input::placeholder{color:#ffffff!important;opacity:0.9}.dark .DocSearch-Reset,.dark .DocSearch-Reset span,.dark .DocSearch-Reset svg,.dark .DocSearch-Close,.dark .DocSearch-Close svg{color:#5172ff!important;fill:#5172ff!important;stroke:#5172ff!important}.dark .DocSearch-Cancel,.dark .DocSearch-Cancel svg{color:#ffffff!important;fill:#ffffff!important;stroke:#ffffff!important}.dark .DocSearch-MagnifierLabel,.dark .DocSearch-MagnifierLabel svg{color:#5172ff!important;fill:#5172ff!important;stroke:#5172ff!important}.dark .DocSearch-Dropdown{background-color:#0a0b11!important}.dark .DocSearch-Hits mark{background-color:transparent!important;color:#7aa2ff!important}.dark .DocSearch-Hit a{color:#e5e7eb!important;border-color:#1b1e29!important}.dark .DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.dark .DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon{color:#7aa2ff}.dark .DocSearch-Title,.dark .DocSearch-Label{background-color:#0f1117!important}.dark .DocSearch-Title,.dark .DocSearch-Label,.dark .DocSearch-Hit-source{color:#e5e7eb!important}.dark .DocSearch-Footer{background-color:#0f1117!important;border-top:1px solid #1b1e29!important;color:#cbd5e1!important}.DocSearch-Hit--AskAI .DocSearch-AskAiScreen-Response .DocSearch-AskAiScreen-RelatedSources-Item-Link{background:var(--docsearch-hit-background-muted)!important}.DocSearch-Hit-AskAIButton-title-query{color:var(--docsearch-highlight-color)}.dark .DocSearch-Hit-AskAIButton-title-query{color:#7aa2ff!important}.dark .DocSearch-AskAiScreen-Response{color:#f5f6f7!important}.dark .DocSearch-Markdown-Content,.dark .DocSearch-Markdown-Content li{color:#cbd5e1!important}.dark .DocSearch-Markdown-Content a{color:#7aa2ff!important}.dark .DocSearch-AskAiScreen-RelatedSources-Item-Link{color:#cbd5e1}.dark .DocSearch-AskAiScreen-Response .DocSearch-CodeSnippet .DocSearch-CodeSnippet-CopyButton{background-color:#0f1117!important;color:#cbd5e1!important}.dark .DocSearch-AskAiScreen-Response .DocSearch-CodeSnippet pre{background-color:#0f1117!important;color:#e5e7eb!important}.dark .DocSearch-AskAiScreen-Response .DocSearch-CodeSnippet pre code{background-color:transparent!important;color:inherit!important}.DocSearch-Modal{position:relative;overflow:hidden;width:700px;max-width:90vw;border-radius:var(--radius);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15)}.docsearch-expanded .DocSearch-Modal{max-height:auto;border-radius:var(--radius);box-shadow:0 25px 50px -12px rgba(0, 0, 0, 0.25)}@media (max-width: 768px){.DocSearch-Container{padding-top:0}.DocSearch-Modal{width:100vw;max-width:100vw;border-radius:var(--radius)}.docsearch-expanded .DocSearch-Modal{max-height:100vh;border-radius:var(--radius)}.DocSearch-Dropdown{height:calc(100vh - var(--docsearch-footer-height) - var(--docsearch-searchbox-height, var(--docsearch-searchbox-initial-height)))}.docsearch-sidepanel-toggle .docsearch-sidepanel-label,.docsearch-sidepanel-toggle .docsearch-sidepanel-shortcut{display:none}.docsearch-sidepanel-toggle{padding:0 0.5rem}}@media (min-width: 769px){.docsearch-sidepanel-toggle{border:1px solid transparent;box-shadow:0 0 0 1px rgba(156, 163, 175, 0.3)}.docsearch-sidepanel-toggle:hover{box-shadow:0 0 0 1px rgba(75, 85, 99, 0.3)}html.dark .docsearch-sidepanel-toggle{box-shadow:0 0 0 1px rgba(75, 85, 99, 0.3)}html.dark .docsearch-sidepanel-toggle:hover{box-shadow:0 0 0 1px rgba(107, 114, 128, 0.3)}}.DocSearch-Sidepanel-Header{height:3.0rem}.DocSearch-Sidepanel-Container.inline.side-right{border-bottom-left-radius:0;border-left:1px solid var(--docsearch-sidepanel-border);border-top-left-radius:0}.DocSearch-Sidepanel-Container{box-shadow:none}.DocSearch-MCP-Callout{font-size:0.875em;display:flex;align-items:center;gap:0.25rem;color:var(--docsearch-text-color);padding-inline:0.25rem 0.5rem;padding-block:0.25rem;border-radius:var(--docsearch-border-radius);background-color:var(--docsearch-hit-focus-background);min-block-size:1.5rem}.DocSearch-MCP-Callout:hover,.DocSearch-MCP-Callout:focus-visible{outline:2px solid var(--docsearch-highlight-color)}.DocSearch-MCP-Callout svg{height:1rem;width:1rem;color:var(--docsearch-highlight-color);margin-block-start:1px}html.dark #filter-validator{background-color:var(--shiki-dark-bg)}#filter-validator{.Token_EOF {\n color: transparent;\n }\n\n .Token_Empty_Str,\n .Token_Incomplete_Str,\n .Token_String,\n .Token_Term {\n color: var(--filters-token-string-color);\n }\n\n .Token_Error {\n color: var(--filters-token-error-color);\n }\n\n .Token_Open_Paren,\n .Token_Close_Paren,\n .Token_Open_Angled_Bracket,\n .Token_Close_Angled_Bracket,\n .Token_Comma,\n .Token_Facet_Separator {\n color: var(--filters-token-paren-color);\n }\n\n .Token_Num {\n color: var(--filters-token-num-color);\n }\n\n .Token_OR,\n .Token_AND,\n .Token_NOT,\n .Token_Operator,\n .Token_Range {\n color: var(--filters-token-operator-color);\n }}.nav-tag-pill-text{text-transform:uppercase;letter-spacing:1px}[data-group-tag]>button>div{display:flex;align-items:center;gap:0.5rem}.steps .step .prose ol{list-style-type:lower-alpha}.no-bullets ul{margin-top:1rem;padding-left:0;margin-left:0;list-style:none}@layer components{.prose .no-bullets li{margin:0.5rem 0;margin-left:0!important;padding-left:0!important;list-style:none}}.no-bullets a.link{border-bottom-color:transparent}.no-bullets a.link:hover,.no-bullets a.link:focus-visible{border-bottom-color:rgb(57, 112, 255)}.no-bullets li::before{content:none!important}.homepage-hero{background-color:#23263b;background-image:linear-gradient(\n 90deg,\n rgba(12, 30, 69, 0.82) 0%,\n rgba(12, 30, 69, 0.72) 34%,\n rgba(12, 30, 69, 0.58) 58%,\n rgba(12, 30, 69, 0.44) 100%\n ),\n url(\"/mintlify-assets/hero.png\");background-position:center, 72% center;background-repeat:no-repeat;background-size:cover}@supports (background-image: image-set(url(\"/mintlify-assets/hero.webp\") type(\"image/webp\") 1x)){.homepage-hero{background-image:linear-gradient(\n 90deg,\n rgba(12, 30, 69, 0.82) 0%,\n rgba(12, 30, 69, 0.72) 34%,\n rgba(12, 30, 69, 0.58) 58%,\n rgba(12, 30, 69, 0.44) 100%\n ),\n image-set(\n url(\"/mintlify-assets/hero.webp\") type(\"image/webp\") 1x,\n url(\"/mintlify-assets/hero.png\") type(\"image/png\") 1x\n )}}@supports (background-image: -webkit-image-set(url(\"/mintlify-assets/hero.webp\") type(\"image/webp\") 1x)){.homepage-hero{background-image:linear-gradient(\n 90deg,\n rgba(12, 30, 69, 0.82) 0%,\n rgba(12, 30, 69, 0.72) 34%,\n rgba(12, 30, 69, 0.58) 58%,\n rgba(12, 30, 69, 0.44) 100%\n ),\n -webkit-image-set(\n url(\"/mintlify-assets/hero.webp\") type(\"image/webp\") 1x,\n url(\"/mintlify-assets/hero.png\") type(\"image/png\") 1x\n )}}.homepage-hero-cta{display:inline-flex;align-items:center;justify-content:center;gap:0;padding:0.5rem 0.875rem;border-radius:var(--radius);background:linear-gradient(220deg, rgb(69, 122, 255) 0%, rgb(30, 89, 255) 60.16%);color:#fff!important;font-family:Sora, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.5rem;letter-spacing:0.28px;text-decoration:none;transition:all 150ms ease}.homepage-hero-cta:hover{background:linear-gradient(138deg, rgba(118, 160, 255, 0.7) 0%, rgba(0, 61, 255, 0.7) 25.08%, rgba(151, 71, 255, 0.7) 56.38%, rgba(118, 160, 255, 0.7) 100%), rgb(0, 61, 255);color:#fff!important}@media (min-width: 1024px){.homepage-hero-cta{padding:0.75rem 1.25rem;font-size:1rem;letter-spacing:0.32px}}.sig-param-link{color:inherit;text-decoration:underline;text-decoration-style:dotted;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:color-mix(in srgb, currentColor 45%, transparent);cursor:pointer;border-radius:2px;transition:text-decoration-color 120ms ease, text-decoration-thickness 120ms ease}.sig-param-link:hover,.sig-param-link:focus-visible,.line:has(.sig-param-link:hover) .sig-param-link,.line:has(.sig-param-link:focus-visible) .sig-param-link{text-decoration-style:solid;text-decoration-thickness:2px;text-decoration-color:currentColor;outline:none}.mint-flavor-switcher-slot{min-height:2.75rem;margin:0.25rem 0 1.5rem}.mint-flavor-switcher-slot .mint-flavor-switcher{margin:0}"}],"page":{"pagePath":"doc/rest-api/search/save-rules","slug":"/doc/rest-api/search/save-rules","pageMetadata":{"title":"Create or update rules","description":"Create or update multiple rules.","openapi":"specs/search.yml post /1/indexes/{indexName}/rules/batch","public":true,"href":"/doc/rest-api/search/save-rules"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create or update multiple rules.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components};return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`If a rule with the specified object ID doesn’t exist, Algolia creates a new one.\nOtherwise, existing rules are replaced.`}),`\n`,_jsxs(_components.p,{children:[`This operation is subject to `,_jsx(_components.a,{href:`https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia`,children:`indexing rate limits`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Required ACL:`}),` `,_jsx(_components.code,{children:`editSettings`})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Create or update rules","description":"Create or update multiple rules.","openapi":"specs/search.yml post /1/indexes/{indexName}/rules/batch","public":true,"href":"/doc/rest-api/search/save-rules"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/algolia/34bdaaeaccaa769c/docsearch.js","/_mintlify/custom/algolia/e18afef8ba6306ba/one-trust.js","/_mintlify/custom/algolia/5a5e6ade8ff45aec/utm-attribution.js","/_mintlify/custom/algolia/a4b9f2f416e55759/iframe-resize.js","/_mintlify/custom/algolia/dbca34a8de6b147e/instantsearch-api-signature-links.js","/_mintlify/custom/algolia/4e6ff31277aab3f2/segment-analytics.js","/_mintlify/custom/algolia/ae5f1d742fc727f6/optinmonster.js"],"openApiReferenceData":{"operation":{"tags":["Rules"],"operationId":"saveRules","x-acl":["editSettings"],"summary":"Create or update rules","description":"Create or update multiple rules.","x-codegen-request-body-name":"rules","parameters":["0fb5e6a6-a171-47a1-a6a4-d5e267aba34e","4482c05f-ca1f-4a96-a6aa-b775dd44f89d","38de6bf5-9d29-4ac6-b44b-ee071910c25a"],"requestBody":"397d613c-7177-4881-9612-89bb53363691","responses":{"200":"bc59135b-3333-4f80-8e3d-f3f15fa2a536","400":"9aea4856-0d55-4fcd-8774-2d441cdb601c","402":"0e61efa4-63d8-4793-afa9-e4484e299a9e","403":"219f2dbd-26e4-4f53-86c9-6f9f209edab5","404":"2e1704ef-4bb2-4e27-ba5f-72cc553bbd34"},"x-codeSamples":[{"lang":"csharp","label":"C#","source":"// Initialize the client\nvar client = new SearchClient(new SearchConfig(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\"));\n\n// Call the API\nvar response = await client.SaveRulesAsync(\n \"\u003cYOUR_INDEX_NAME>\",\n new List\u003cRule>\n {\n new Rule\n {\n ObjectID = \"a-rule-id\",\n Conditions = new List\u003cCondition>\n {\n new Condition { Pattern = \"smartphone\", Anchoring = Enum.Parse\u003cAnchoring>(\"Contains\") },\n },\n Consequence = new Consequence\n {\n Params = new ConsequenceParams { Filters = \"brand:apple\" },\n },\n },\n new Rule\n {\n ObjectID = \"a-second-rule-id\",\n Conditions = new List\u003cCondition>\n {\n new Condition { Pattern = \"apple\", Anchoring = Enum.Parse\u003cAnchoring>(\"Contains\") },\n },\n Consequence = new Consequence\n {\n Params = new ConsequenceParams { Filters = \"brand:samsung\" },\n },\n },\n },\n false,\n true\n);\n\n// print the response\nConsole.WriteLine(response);"},{"lang":"dart","label":"Dart","source":"// Initialize the client\nfinal client =\n SearchClient(appId: 'ALGOLIA_APPLICATION_ID', apiKey: 'ALGOLIA_API_KEY');\n\n// Call the API\nfinal response = await client.saveRules(\n indexName: \"\u003cYOUR_INDEX_NAME>\",\n rules: [\n Rule(\n objectID: \"a-rule-id\",\n conditions: [\n Condition(\n pattern: \"smartphone\",\n anchoring: Anchoring.fromJson(\"contains\"),\n ),\n ],\n consequence: Consequence(\n params: ConsequenceParams(\n filters: \"brand:apple\",\n ),\n ),\n ),\n Rule(\n objectID: \"a-second-rule-id\",\n conditions: [\n Condition(\n pattern: \"apple\",\n anchoring: Anchoring.fromJson(\"contains\"),\n ),\n ],\n consequence: Consequence(\n params: ConsequenceParams(\n filters: \"brand:samsung\",\n ),\n ),\n ),\n ],\n forwardToReplicas: false,\n clearExistingRules: true,\n);\n\n// print the response\nprint(response);"},{"lang":"go","label":"Go","source":"// Initialize the client\nclient, err := search.NewClient(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\")\nif err != nil {\n // The client can fail to initialize if you pass an invalid parameter.\n panic(err)\n}\n\n// Call the API\nresponse, err := client.SaveRules(client.NewApiSaveRulesRequest(\n \"\u003cYOUR_INDEX_NAME>\",\n []search.Rule{*search.NewEmptyRule().SetObjectID(\"a-rule-id\").SetConditions(\n []search.Condition{*search.NewEmptyCondition().SetPattern(\"smartphone\").SetAnchoring(search.Anchoring(\"contains\"))}).SetConsequence(\n search.NewEmptyConsequence().SetParams(\n search.NewEmptyConsequenceParams().SetFilters(\"brand:apple\"))), *search.NewEmptyRule().SetObjectID(\"a-second-rule-id\").SetConditions(\n []search.Condition{*search.NewEmptyCondition().SetPattern(\"apple\").SetAnchoring(search.Anchoring(\"contains\"))}).SetConsequence(\n search.NewEmptyConsequence().SetParams(\n search.NewEmptyConsequenceParams().SetFilters(\"brand:samsung\")))}).WithForwardToReplicas(false).WithClearExistingRules(true))\nif err != nil {\n // handle the eventual error\n panic(err)\n}\n\n\n// print the response\nprint(response)"},{"lang":"java","label":"Java","source":"// Initialize the client\nSearchClient client = new SearchClient(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\");\n\n// Call the API\nUpdatedAtResponse response = client.saveRules(\n \"\u003cYOUR_INDEX_NAME>\",\n Arrays.asList(\n new Rule()\n .setObjectID(\"a-rule-id\")\n .setConditions(Arrays.asList(new Condition().setPattern(\"smartphone\").setAnchoring(Anchoring.CONTAINS)))\n .setConsequence(new Consequence().setParams(new ConsequenceParams().setFilters(\"brand:apple\"))),\n new Rule()\n .setObjectID(\"a-second-rule-id\")\n .setConditions(Arrays.asList(new Condition().setPattern(\"apple\").setAnchoring(Anchoring.CONTAINS)))\n .setConsequence(new Consequence().setParams(new ConsequenceParams().setFilters(\"brand:samsung\")))\n ),\n false,\n true\n);\n\n// print the response\nSystem.out.println(response);"},{"lang":"javascript","label":"JavaScript","source":"// Initialize the client\nconst client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');\n\n// Call the API\nconst response = await client.saveRules({\n indexName: '\u003cYOUR_INDEX_NAME>',\n rules: [\n {\n objectID: 'a-rule-id',\n conditions: [{ pattern: 'smartphone', anchoring: 'contains' }],\n consequence: { params: { filters: 'brand:apple' } },\n },\n {\n objectID: 'a-second-rule-id',\n conditions: [{ pattern: 'apple', anchoring: 'contains' }],\n consequence: { params: { filters: 'brand:samsung' } },\n },\n ],\n forwardToReplicas: false,\n clearExistingRules: true,\n});\n\n\n// print the response\nconsole.log(response);"},{"lang":"kotlin","label":"Kotlin","source":"// Initialize the client\nval client = SearchClient(appId = \"ALGOLIA_APPLICATION_ID\", apiKey = \"ALGOLIA_API_KEY\")\n\n// Call the API\nvar response =\n client.saveRules(\n indexName = \"\u003cYOUR_INDEX_NAME>\",\n rules =\n listOf(\n Rule(\n objectID = \"a-rule-id\",\n conditions =\n listOf(\n Condition(\n pattern = \"smartphone\",\n anchoring = Anchoring.entries.first { it.value == \"contains\" },\n )\n ),\n consequence = Consequence(params = ConsequenceParams(filters = \"brand:apple\")),\n ),\n Rule(\n objectID = \"a-second-rule-id\",\n conditions =\n listOf(\n Condition(\n pattern = \"apple\",\n anchoring = Anchoring.entries.first { it.value == \"contains\" },\n )\n ),\n consequence = Consequence(params = ConsequenceParams(filters = \"brand:samsung\")),\n ),\n ),\n forwardToReplicas = false,\n clearExistingRules = true,\n )\n\n\n// print the response\nprintln(response)"},{"lang":"php","label":"PHP","source":"// Initialize the client\n$client = SearchClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');\n\n// Call the API\n$response = $client->saveRules(\n '\u003cYOUR_INDEX_NAME>',\n [\n ['objectID' => 'a-rule-id',\n 'conditions' => [\n ['pattern' => 'smartphone',\n 'anchoring' => 'contains',\n ],\n ],\n 'consequence' => ['params' => ['filters' => 'brand:apple',\n ],\n ],\n ],\n\n ['objectID' => 'a-second-rule-id',\n 'conditions' => [\n ['pattern' => 'apple',\n 'anchoring' => 'contains',\n ],\n ],\n 'consequence' => ['params' => ['filters' => 'brand:samsung',\n ],\n ],\n ],\n ],\n false,\n true,\n);\n\n\n// print the response\nvar_dump($response);"},{"lang":"python","label":"Python","source":"# Initialize the client\n# In an asynchronous context, you can use SearchClient instead, which exposes the exact same methods.\nclient = SearchClientSync(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\")\n\n# Call the API\nresponse = client.save_rules(\n index_name=\"\u003cYOUR_INDEX_NAME>\",\n rules=[\n {\n \"objectID\": \"a-rule-id\",\n \"conditions\": [\n {\n \"pattern\": \"smartphone\",\n \"anchoring\": \"contains\",\n },\n ],\n \"consequence\": {\n \"params\": {\n \"filters\": \"brand:apple\",\n },\n },\n },\n {\n \"objectID\": \"a-second-rule-id\",\n \"conditions\": [\n {\n \"pattern\": \"apple\",\n \"anchoring\": \"contains\",\n },\n ],\n \"consequence\": {\n \"params\": {\n \"filters\": \"brand:samsung\",\n },\n },\n },\n ],\n forward_to_replicas=False,\n clear_existing_rules=True,\n)\n\n\n# print the response\nprint(response)"},{"lang":"ruby","label":"Ruby","source":"# Initialize the client\nclient = Algolia::SearchClient.create(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\")\n\n# Call the API\nresponse = client.save_rules(\n \"\u003cYOUR_INDEX_NAME>\",\n [\n Algolia::Search::Rule.new(\n algolia_object_id: \"a-rule-id\",\n conditions: [Algolia::Search::Condition.new(pattern: \"smartphone\", anchoring: \"contains\")],\n consequence: Algolia::Search::Consequence.new(\n params: Algolia::Search::ConsequenceParams.new(filters: \"brand:apple\")\n )\n ),\n Algolia::Search::Rule.new(\n algolia_object_id: \"a-second-rule-id\",\n conditions: [Algolia::Search::Condition.new(pattern: \"apple\", anchoring: \"contains\")],\n consequence: Algolia::Search::Consequence.new(\n params: Algolia::Search::ConsequenceParams.new(filters: \"brand:samsung\")\n )\n )\n ],\n false,\n true\n)\n\n\n# print the response\nputs(response)"},{"lang":"scala","label":"Scala","source":"// Initialize the client\nval client = SearchClient(appId = \"ALGOLIA_APPLICATION_ID\", apiKey = \"ALGOLIA_API_KEY\")\n\n// Call the API\nval response = Await.result(\n client.saveRules(\n indexName = \"\u003cYOUR_INDEX_NAME>\",\n rules = Seq(\n Rule(\n objectID = \"a-rule-id\",\n conditions = Some(\n Seq(\n Condition(\n pattern = Some(\"smartphone\"),\n anchoring = Some(Anchoring.withName(\"contains\"))\n )\n )\n ),\n consequence = Consequence(\n params = Some(\n ConsequenceParams(\n filters = Some(\"brand:apple\")\n )\n )\n )\n ),\n Rule(\n objectID = \"a-second-rule-id\",\n conditions = Some(\n Seq(\n Condition(\n pattern = Some(\"apple\"),\n anchoring = Some(Anchoring.withName(\"contains\"))\n )\n )\n ),\n consequence = Consequence(\n params = Some(\n ConsequenceParams(\n filters = Some(\"brand:samsung\")\n )\n )\n )\n )\n ),\n forwardToReplicas = Some(false),\n clearExistingRules = Some(true)\n ),\n Duration(100, \"sec\")\n)\n\n// print the response\nprintln(response)"},{"lang":"swift","label":"Swift","source":"// Initialize the client\nlet client = try SearchClient(appID: \"ALGOLIA_APPLICATION_ID\", apiKey: \"ALGOLIA_API_KEY\")\n\n// Call the API\nlet response = try await client.saveRules(\n indexName: \"\u003cYOUR_INDEX_NAME>\",\n rules: [\n Rule(objectID: \"a-rule-id\", conditions: [SearchCondition(\n pattern: \"smartphone\",\n anchoring: SearchAnchoring.contains\n )], consequence: SearchConsequence(params: SearchConsequenceParams(filters: \"brand:apple\"))),\n Rule(\n objectID: \"a-second-rule-id\",\n conditions: [SearchCondition(pattern: \"apple\", anchoring: SearchAnchoring.contains)],\n consequence: SearchConsequence(params: SearchConsequenceParams(filters: \"brand:samsung\"))\n ),\n ],\n forwardToReplicas: false,\n clearExistingRules: true\n)\n\n// print the response\nprint(response)"},{"lang":"cURL","label":"curl","source":"curl --request POST \\\n --url 'https://algolia_application_id.algolia.net/1/indexes/ALGOLIA_INDEX_NAME/rules/batch?forwardToReplicas=true\u0026clearExistingRules=true' \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header 'x-algolia-api-key: ALGOLIA_API_KEY' \\\n --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \\\n --data '\n[\n {\n \"objectID\": \"lorem\",\n \"conditions\": [\n {\n \"pattern\": \"{facet:genre}\",\n \"anchoring\": \"is\",\n \"alternatives\": false,\n \"context\": \"mobile\",\n \"filters\": \"genre:comedy\"\n }\n ],\n \"consequence\": {\n \"params\": {\n \"similarQuery\": \"comedy drama crime Macy Buscemi\",\n \"filters\": \"(category:Book OR category:Ebook) AND _tags:published\",\n \"facetFilters\": [\n [\n \"category:Book\",\n \"category:-Movie\"\n ],\n \"author:John Doe\"\n ],\n \"optionalFilters\": [\n \"category:Book\",\n \"author:John Doe\"\n ],\n \"numericFilters\": [\n [\n \"inStock = 1\",\n \"deliveryDate \u003c 1441755506\"\n ],\n \"price \u003c 1000\"\n ],\n \"tagFilters\": [\n [\n \"Book\",\n \"Movie\"\n ],\n \"SciFi\"\n ],\n \"sumOrFiltersScores\": false,\n \"restrictSearchableAttributes\": [\n \"title\",\n \"author\"\n ],\n \"facets\": [\n \"*\"\n ],\n \"facetingAfterDistinct\": false,\n \"page\": 0,\n \"offset\": 42,\n \"length\": 0,\n \"aroundLatLng\": \"40.71,-74.01\",\n \"aroundLatLngViaIP\": false,\n \"aroundRadius\": 1,\n \"aroundPrecision\": 10,\n \"minimumAroundRadius\": 1,\n \"insideBoundingBox\": \"lorem\",\n \"insidePolygon\": [\n [\n 47.3165,\n 4.9665,\n 47.3424,\n 5.0201,\n 47.32,\n 4.9\n ],\n [\n 40.9234,\n 2.1185,\n 38.643,\n 1.9916,\n 39.2587,\n 2.0104\n ]\n ],\n \"naturalLanguages\": [],\n \"ruleContexts\": [\n \"mobile\"\n ],\n \"personalizationImpact\": 100,\n \"userToken\": \"test-user-123\",\n \"getRankingInfo\": false,\n \"synonyms\": true,\n \"clickAnalytics\": false,\n \"analytics\": true,\n \"analyticsTags\": [],\n \"percentileComputation\": true,\n \"enableABTest\": true,\n \"attributesToRetrieve\": [\n \"author\",\n \"title\",\n \"content\"\n ],\n \"ranking\": [\n \"typo\",\n \"geo\",\n \"words\",\n \"filters\",\n \"proximity\",\n \"attribute\",\n \"exact\",\n \"custom\"\n ],\n \"relevancyStrictness\": 90,\n \"attributesToHighlight\": [\n \"author\",\n \"title\",\n \"conten\",\n \"content\"\n ],\n \"attributesToSnippet\": [\n \"content:80\",\n \"description\"\n ],\n \"highlightPreTag\": \"\u003cem>\",\n \"highlightPostTag\": \"\u003c/em>\",\n \"snippetEllipsisText\": \"…\",\n \"restrictHighlightAndSnippetArrays\": false,\n \"hitsPerPage\": 20,\n \"minWordSizefor1Typo\": 4,\n \"minWordSizefor2Typos\": 8,\n \"typoTolerance\": true,\n \"allowTyposOnNumericTokens\": true,\n \"disableTypoToleranceOnAttributes\": [\n \"sku\"\n ],\n \"ignorePlurals\": [\n \"ca\",\n \"es\"\n ],\n \"removeStopWords\": [\n \"ca\",\n \"es\"\n ],\n \"queryLanguages\": [\n \"es\"\n ],\n \"decompoundQuery\": true,\n \"enableRules\": true,\n \"enablePersonalization\": false,\n \"queryType\": \"prefixLast\",\n \"removeWordsIfNoResults\": \"firstWords\",\n \"mode\": \"keywordSearch\",\n \"semanticSearch\": {\n \"eventSources\": [\n \"lorem\"\n ]\n },\n \"advancedSyntax\": false,\n \"optionalWords\": \"lorem\",\n \"disableExactOnAttributes\": [\n \"description\"\n ],\n \"exactOnSingleWordQuery\": \"attribute\",\n \"alternativesAsExact\": [\n \"ignorePlurals\",\n \"singleWordSynonym\"\n ],\n \"advancedSyntaxFeatures\": [\n \"exactPhrase\",\n \"excludeWords\"\n ],\n \"distinct\": 1,\n \"replaceSynonymsInHighlight\": false,\n \"minProximity\": 1,\n \"responseFields\": [\n \"*\"\n ],\n \"maxValuesPerFacet\": 100,\n \"sortFacetValuesBy\": \"count\",\n \"attributeCriteriaComputedByMinProximity\": false,\n \"attributeCriteriaComputedBy\": \"best\",\n \"renderingContent\": {\n \"facetOrdering\": {\n \"facets\": {\n \"order\": [\n \"lorem\"\n ]\n },\n \"values\": {\n \"property1\": {\n \"order\": [\n \"lorem\"\n ],\n \"sortRemainingBy\": \"count\",\n \"hide\": [\n \"lorem\"\n ]\n },\n \"property2\": {\n \"order\": [\n \"lorem\"\n ],\n \"sortRemainingBy\": \"count\",\n \"hide\": [\n \"lorem\"\n ]\n }\n }\n },\n \"redirect\": {\n \"url\": \"lorem\"\n },\n \"widgets\": {\n \"banners\": [\n {\n \"image\": {\n \"urls\": [\n {\n \"url\": \"lorem\"\n }\n ],\n \"title\": \"lorem\"\n },\n \"link\": {\n \"url\": \"lorem\"\n }\n }\n ],\n \"resultCard\": {\n \"enabled\": true\n }\n }\n },\n \"enableReRanking\": true,\n \"reRankingApplyFilter\": [\n []\n ],\n \"query\": {\n \"remove\": [\n \"lorem\"\n ],\n \"edits\": [\n {\n \"type\": \"remove\",\n \"delete\": \"lorem\",\n \"insert\": \"lorem\"\n }\n ]\n },\n \"automaticFacetFilters\": [\n {\n \"facet\": \"lorem\",\n \"score\": 1,\n \"disjunctive\": false\n }\n ],\n \"automaticOptionalFacetFilters\": [\n {\n \"facet\": \"lorem\",\n \"score\": 1,\n \"disjunctive\": false\n }\n ]\n },\n \"promote\": [\n {\n \"objectIDs\": [\n \"test-record-123\"\n ],\n \"position\": 0\n }\n ],\n \"filterPromotes\": false,\n \"hide\": [\n {\n \"objectID\": \"test-record-123\"\n }\n ],\n \"redirect\": {\n \"indexName\": \"lorem\"\n },\n \"userData\": {\n \"settingID\": \"f2a7b51e3503acc6a39b3784ffb84300\",\n \"pluginVersion\": \"1.6.0\"\n }\n },\n \"description\": \"Display a promotional banner\",\n \"enabled\": true,\n \"validity\": [\n {\n \"from\": 42,\n \"until\": 42\n }\n ],\n \"tags\": [\n \"lorem\"\n ],\n \"scope\": \"lorem\",\n \"condition\": {\n \"pattern\": \"{facet:genre}\",\n \"anchoring\": \"is\",\n \"alternatives\": false,\n \"context\": \"mobile\",\n \"filters\": \"genre:comedy\"\n }\n }\n]\n'"}],"method":"post","type":"path","servers":["0aad5a48-7de4-4524-b934-2ac2ba432076","ba3c5d9d-cbe0-4b42-b8c7-c60e8ef39300","caaeb03e-4370-4636-8188-617507a40b94","c3a3843e-e2b9-408c-913e-aa7408c6ed9e","40e97917-1a69-4582-958a-876359d478c0"],"security":["6778c432-073c-4e26-8fa5-302c60cfbd65"],"path":"/1/indexes/{indexName}/rules/batch","baseUrlOptions":["https://{appId}.algolia.net","https://{appId}-1.algolianet.com","https://{appId}-2.algolianet.com","https://{appId}-3.algolianet.com","https://{appId}-dsn.algolia.net"],"title":"Create or update rules","codeSamples":[{"label":"C#","lang":"csharp","source":"// Initialize the client\nvar client = new SearchClient(new SearchConfig(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\"));\n\n// Call the API\nvar response = await client.SaveRulesAsync(\n \"\u003cYOUR_INDEX_NAME>\",\n new List\u003cRule>\n {\n new Rule\n {\n ObjectID = \"a-rule-id\",\n Conditions = new List\u003cCondition>\n {\n new Condition { Pattern = \"smartphone\", Anchoring = Enum.Parse\u003cAnchoring>(\"Contains\") },\n },\n Consequence = new Consequence\n {\n Params = new ConsequenceParams { Filters = \"brand:apple\" },\n },\n },\n new Rule\n {\n ObjectID = \"a-second-rule-id\",\n Conditions = new List\u003cCondition>\n {\n new Condition { Pattern = \"apple\", Anchoring = Enum.Parse\u003cAnchoring>(\"Contains\") },\n },\n Consequence = new Consequence\n {\n Params = new ConsequenceParams { Filters = \"brand:samsung\" },\n },\n },\n },\n false,\n true\n);\n\n// print the response\nConsole.WriteLine(response);"},{"label":"Dart","lang":"dart","source":"// Initialize the client\nfinal client =\n SearchClient(appId: 'ALGOLIA_APPLICATION_ID', apiKey: 'ALGOLIA_API_KEY');\n\n// Call the API\nfinal response = await client.saveRules(\n indexName: \"\u003cYOUR_INDEX_NAME>\",\n rules: [\n Rule(\n objectID: \"a-rule-id\",\n conditions: [\n Condition(\n pattern: \"smartphone\",\n anchoring: Anchoring.fromJson(\"contains\"),\n ),\n ],\n consequence: Consequence(\n params: ConsequenceParams(\n filters: \"brand:apple\",\n ),\n ),\n ),\n Rule(\n objectID: \"a-second-rule-id\",\n conditions: [\n Condition(\n pattern: \"apple\",\n anchoring: Anchoring.fromJson(\"contains\"),\n ),\n ],\n consequence: Consequence(\n params: ConsequenceParams(\n filters: \"brand:samsung\",\n ),\n ),\n ),\n ],\n forwardToReplicas: false,\n clearExistingRules: true,\n);\n\n// print the response\nprint(response);"},{"label":"Go","lang":"go","source":"// Initialize the client\nclient, err := search.NewClient(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\")\nif err != nil {\n // The client can fail to initialize if you pass an invalid parameter.\n panic(err)\n}\n\n// Call the API\nresponse, err := client.SaveRules(client.NewApiSaveRulesRequest(\n \"\u003cYOUR_INDEX_NAME>\",\n []search.Rule{*search.NewEmptyRule().SetObjectID(\"a-rule-id\").SetConditions(\n []search.Condition{*search.NewEmptyCondition().SetPattern(\"smartphone\").SetAnchoring(search.Anchoring(\"contains\"))}).SetConsequence(\n search.NewEmptyConsequence().SetParams(\n search.NewEmptyConsequenceParams().SetFilters(\"brand:apple\"))), *search.NewEmptyRule().SetObjectID(\"a-second-rule-id\").SetConditions(\n []search.Condition{*search.NewEmptyCondition().SetPattern(\"apple\").SetAnchoring(search.Anchoring(\"contains\"))}).SetConsequence(\n search.NewEmptyConsequence().SetParams(\n search.NewEmptyConsequenceParams().SetFilters(\"brand:samsung\")))}).WithForwardToReplicas(false).WithClearExistingRules(true))\nif err != nil {\n // handle the eventual error\n panic(err)\n}\n\n\n// print the response\nprint(response)"},{"label":"Java","lang":"java","source":"// Initialize the client\nSearchClient client = new SearchClient(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\");\n\n// Call the API\nUpdatedAtResponse response = client.saveRules(\n \"\u003cYOUR_INDEX_NAME>\",\n Arrays.asList(\n new Rule()\n .setObjectID(\"a-rule-id\")\n .setConditions(Arrays.asList(new Condition().setPattern(\"smartphone\").setAnchoring(Anchoring.CONTAINS)))\n .setConsequence(new Consequence().setParams(new ConsequenceParams().setFilters(\"brand:apple\"))),\n new Rule()\n .setObjectID(\"a-second-rule-id\")\n .setConditions(Arrays.asList(new Condition().setPattern(\"apple\").setAnchoring(Anchoring.CONTAINS)))\n .setConsequence(new Consequence().setParams(new ConsequenceParams().setFilters(\"brand:samsung\")))\n ),\n false,\n true\n);\n\n// print the response\nSystem.out.println(response);"},{"label":"JavaScript","lang":"javascript","source":"// Initialize the client\nconst client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');\n\n// Call the API\nconst response = await client.saveRules({\n indexName: '\u003cYOUR_INDEX_NAME>',\n rules: [\n {\n objectID: 'a-rule-id',\n conditions: [{ pattern: 'smartphone', anchoring: 'contains' }],\n consequence: { params: { filters: 'brand:apple' } },\n },\n {\n objectID: 'a-second-rule-id',\n conditions: [{ pattern: 'apple', anchoring: 'contains' }],\n consequence: { params: { filters: 'brand:samsung' } },\n },\n ],\n forwardToReplicas: false,\n clearExistingRules: true,\n});\n\n\n// print the response\nconsole.log(response);"},{"label":"Kotlin","lang":"kotlin","source":"// Initialize the client\nval client = SearchClient(appId = \"ALGOLIA_APPLICATION_ID\", apiKey = \"ALGOLIA_API_KEY\")\n\n// Call the API\nvar response =\n client.saveRules(\n indexName = \"\u003cYOUR_INDEX_NAME>\",\n rules =\n listOf(\n Rule(\n objectID = \"a-rule-id\",\n conditions =\n listOf(\n Condition(\n pattern = \"smartphone\",\n anchoring = Anchoring.entries.first { it.value == \"contains\" },\n )\n ),\n consequence = Consequence(params = ConsequenceParams(filters = \"brand:apple\")),\n ),\n Rule(\n objectID = \"a-second-rule-id\",\n conditions =\n listOf(\n Condition(\n pattern = \"apple\",\n anchoring = Anchoring.entries.first { it.value == \"contains\" },\n )\n ),\n consequence = Consequence(params = ConsequenceParams(filters = \"brand:samsung\")),\n ),\n ),\n forwardToReplicas = false,\n clearExistingRules = true,\n )\n\n\n// print the response\nprintln(response)"},{"label":"PHP","lang":"php","source":"// Initialize the client\n$client = SearchClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');\n\n// Call the API\n$response = $client->saveRules(\n '\u003cYOUR_INDEX_NAME>',\n [\n ['objectID' => 'a-rule-id',\n 'conditions' => [\n ['pattern' => 'smartphone',\n 'anchoring' => 'contains',\n ],\n ],\n 'consequence' => ['params' => ['filters' => 'brand:apple',\n ],\n ],\n ],\n\n ['objectID' => 'a-second-rule-id',\n 'conditions' => [\n ['pattern' => 'apple',\n 'anchoring' => 'contains',\n ],\n ],\n 'consequence' => ['params' => ['filters' => 'brand:samsung',\n ],\n ],\n ],\n ],\n false,\n true,\n);\n\n\n// print the response\nvar_dump($response);"},{"label":"Python","lang":"python","source":"# Initialize the client\n# In an asynchronous context, you can use SearchClient instead, which exposes the exact same methods.\nclient = SearchClientSync(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\")\n\n# Call the API\nresponse = client.save_rules(\n index_name=\"\u003cYOUR_INDEX_NAME>\",\n rules=[\n {\n \"objectID\": \"a-rule-id\",\n \"conditions\": [\n {\n \"pattern\": \"smartphone\",\n \"anchoring\": \"contains\",\n },\n ],\n \"consequence\": {\n \"params\": {\n \"filters\": \"brand:apple\",\n },\n },\n },\n {\n \"objectID\": \"a-second-rule-id\",\n \"conditions\": [\n {\n \"pattern\": \"apple\",\n \"anchoring\": \"contains\",\n },\n ],\n \"consequence\": {\n \"params\": {\n \"filters\": \"brand:samsung\",\n },\n },\n },\n ],\n forward_to_replicas=False,\n clear_existing_rules=True,\n)\n\n\n# print the response\nprint(response)"},{"label":"Ruby","lang":"ruby","source":"# Initialize the client\nclient = Algolia::SearchClient.create(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\")\n\n# Call the API\nresponse = client.save_rules(\n \"\u003cYOUR_INDEX_NAME>\",\n [\n Algolia::Search::Rule.new(\n algolia_object_id: \"a-rule-id\",\n conditions: [Algolia::Search::Condition.new(pattern: \"smartphone\", anchoring: \"contains\")],\n consequence: Algolia::Search::Consequence.new(\n params: Algolia::Search::ConsequenceParams.new(filters: \"brand:apple\")\n )\n ),\n Algolia::Search::Rule.new(\n algolia_object_id: \"a-second-rule-id\",\n conditions: [Algolia::Search::Condition.new(pattern: \"apple\", anchoring: \"contains\")],\n consequence: Algolia::Search::Consequence.new(\n params: Algolia::Search::ConsequenceParams.new(filters: \"brand:samsung\")\n )\n )\n ],\n false,\n true\n)\n\n\n# print the response\nputs(response)"},{"label":"Scala","lang":"scala","source":"// Initialize the client\nval client = SearchClient(appId = \"ALGOLIA_APPLICATION_ID\", apiKey = \"ALGOLIA_API_KEY\")\n\n// Call the API\nval response = Await.result(\n client.saveRules(\n indexName = \"\u003cYOUR_INDEX_NAME>\",\n rules = Seq(\n Rule(\n objectID = \"a-rule-id\",\n conditions = Some(\n Seq(\n Condition(\n pattern = Some(\"smartphone\"),\n anchoring = Some(Anchoring.withName(\"contains\"))\n )\n )\n ),\n consequence = Consequence(\n params = Some(\n ConsequenceParams(\n filters = Some(\"brand:apple\")\n )\n )\n )\n ),\n Rule(\n objectID = \"a-second-rule-id\",\n conditions = Some(\n Seq(\n Condition(\n pattern = Some(\"apple\"),\n anchoring = Some(Anchoring.withName(\"contains\"))\n )\n )\n ),\n consequence = Consequence(\n params = Some(\n ConsequenceParams(\n filters = Some(\"brand:samsung\")\n )\n )\n )\n )\n ),\n forwardToReplicas = Some(false),\n clearExistingRules = Some(true)\n ),\n Duration(100, \"sec\")\n)\n\n// print the response\nprintln(response)"},{"label":"Swift","lang":"swift","source":"// Initialize the client\nlet client = try SearchClient(appID: \"ALGOLIA_APPLICATION_ID\", apiKey: \"ALGOLIA_API_KEY\")\n\n// Call the API\nlet response = try await client.saveRules(\n indexName: \"\u003cYOUR_INDEX_NAME>\",\n rules: [\n Rule(objectID: \"a-rule-id\", conditions: [SearchCondition(\n pattern: \"smartphone\",\n anchoring: SearchAnchoring.contains\n )], consequence: SearchConsequence(params: SearchConsequenceParams(filters: \"brand:apple\"))),\n Rule(\n objectID: \"a-second-rule-id\",\n conditions: [SearchCondition(pattern: \"apple\", anchoring: SearchAnchoring.contains)],\n consequence: SearchConsequence(params: SearchConsequenceParams(filters: \"brand:samsung\"))\n ),\n ],\n forwardToReplicas: false,\n clearExistingRules: true\n)\n\n// print the response\nprint(response)"},{"label":"curl","lang":"cURL","source":"curl --request POST \\\n --url 'https://algolia_application_id.algolia.net/1/indexes/ALGOLIA_INDEX_NAME/rules/batch?forwardToReplicas=true\u0026clearExistingRules=true' \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header 'x-algolia-api-key: ALGOLIA_API_KEY' \\\n --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \\\n --data '\n[\n {\n \"objectID\": \"lorem\",\n \"conditions\": [\n {\n \"pattern\": \"{facet:genre}\",\n \"anchoring\": \"is\",\n \"alternatives\": false,\n \"context\": \"mobile\",\n \"filters\": \"genre:comedy\"\n }\n ],\n \"consequence\": {\n \"params\": {\n \"similarQuery\": \"comedy drama crime Macy Buscemi\",\n \"filters\": \"(category:Book OR category:Ebook) AND _tags:published\",\n \"facetFilters\": [\n [\n \"category:Book\",\n \"category:-Movie\"\n ],\n \"author:John Doe\"\n ],\n \"optionalFilters\": [\n \"category:Book\",\n \"author:John Doe\"\n ],\n \"numericFilters\": [\n [\n \"inStock = 1\",\n \"deliveryDate \u003c 1441755506\"\n ],\n \"price \u003c 1000\"\n ],\n \"tagFilters\": [\n [\n \"Book\",\n \"Movie\"\n ],\n \"SciFi\"\n ],\n \"sumOrFiltersScores\": false,\n \"restrictSearchableAttributes\": [\n \"title\",\n \"author\"\n ],\n \"facets\": [\n \"*\"\n ],\n \"facetingAfterDistinct\": false,\n \"page\": 0,\n \"offset\": 42,\n \"length\": 0,\n \"aroundLatLng\": \"40.71,-74.01\",\n \"aroundLatLngViaIP\": false,\n \"aroundRadius\": 1,\n \"aroundPrecision\": 10,\n \"minimumAroundRadius\": 1,\n \"insideBoundingBox\": \"lorem\",\n \"insidePolygon\": [\n [\n 47.3165,\n 4.9665,\n 47.3424,\n 5.0201,\n 47.32,\n 4.9\n ],\n [\n 40.9234,\n 2.1185,\n 38.643,\n 1.9916,\n 39.2587,\n 2.0104\n ]\n ],\n \"naturalLanguages\": [],\n \"ruleContexts\": [\n \"mobile\"\n ],\n \"personalizationImpact\": 100,\n \"userToken\": \"test-user-123\",\n \"getRankingInfo\": false,\n \"synonyms\": true,\n \"clickAnalytics\": false,\n \"analytics\": true,\n \"analyticsTags\": [],\n \"percentileComputation\": true,\n \"enableABTest\": true,\n \"attributesToRetrieve\": [\n \"author\",\n \"title\",\n \"content\"\n ],\n \"ranking\": [\n \"typo\",\n \"geo\",\n \"words\",\n \"filters\",\n \"proximity\",\n \"attribute\",\n \"exact\",\n \"custom\"\n ],\n \"relevancyStrictness\": 90,\n \"attributesToHighlight\": [\n \"author\",\n \"title\",\n \"conten\",\n \"content\"\n ],\n \"attributesToSnippet\": [\n \"content:80\",\n \"description\"\n ],\n \"highlightPreTag\": \"\u003cem>\",\n \"highlightPostTag\": \"\u003c/em>\",\n \"snippetEllipsisText\": \"…\",\n \"restrictHighlightAndSnippetArrays\": false,\n \"hitsPerPage\": 20,\n \"minWordSizefor1Typo\": 4,\n \"minWordSizefor2Typos\": 8,\n \"typoTolerance\": true,\n \"allowTyposOnNumericTokens\": true,\n \"disableTypoToleranceOnAttributes\": [\n \"sku\"\n ],\n \"ignorePlurals\": [\n \"ca\",\n \"es\"\n ],\n \"removeStopWords\": [\n \"ca\",\n \"es\"\n ],\n \"queryLanguages\": [\n \"es\"\n ],\n \"decompoundQuery\": true,\n \"enableRules\": true,\n \"enablePersonalization\": false,\n \"queryType\": \"prefixLast\",\n \"removeWordsIfNoResults\": \"firstWords\",\n \"mode\": \"keywordSearch\",\n \"semanticSearch\": {\n \"eventSources\": [\n \"lorem\"\n ]\n },\n \"advancedSyntax\": false,\n \"optionalWords\": \"lorem\",\n \"disableExactOnAttributes\": [\n \"description\"\n ],\n \"exactOnSingleWordQuery\": \"attribute\",\n \"alternativesAsExact\": [\n \"ignorePlurals\",\n \"singleWordSynonym\"\n ],\n \"advancedSyntaxFeatures\": [\n \"exactPhrase\",\n \"excludeWords\"\n ],\n \"distinct\": 1,\n \"replaceSynonymsInHighlight\": false,\n \"minProximity\": 1,\n \"responseFields\": [\n \"*\"\n ],\n \"maxValuesPerFacet\": 100,\n \"sortFacetValuesBy\": \"count\",\n \"attributeCriteriaComputedByMinProximity\": false,\n \"attributeCriteriaComputedBy\": \"best\",\n \"renderingContent\": {\n \"facetOrdering\": {\n \"facets\": {\n \"order\": [\n \"lorem\"\n ]\n },\n \"values\": {\n \"property1\": {\n \"order\": [\n \"lorem\"\n ],\n \"sortRemainingBy\": \"count\",\n \"hide\": [\n \"lorem\"\n ]\n },\n \"property2\": {\n \"order\": [\n \"lorem\"\n ],\n \"sortRemainingBy\": \"count\",\n \"hide\": [\n \"lorem\"\n ]\n }\n }\n },\n \"redirect\": {\n \"url\": \"lorem\"\n },\n \"widgets\": {\n \"banners\": [\n {\n \"image\": {\n \"urls\": [\n {\n \"url\": \"lorem\"\n }\n ],\n \"title\": \"lorem\"\n },\n \"link\": {\n \"url\": \"lorem\"\n }\n }\n ],\n \"resultCard\": {\n \"enabled\": true\n }\n }\n },\n \"enableReRanking\": true,\n \"reRankingApplyFilter\": [\n []\n ],\n \"query\": {\n \"remove\": [\n \"lorem\"\n ],\n \"edits\": [\n {\n \"type\": \"remove\",\n \"delete\": \"lorem\",\n \"insert\": \"lorem\"\n }\n ]\n },\n \"automaticFacetFilters\": [\n {\n \"facet\": \"lorem\",\n \"score\": 1,\n \"disjunctive\": false\n }\n ],\n \"automaticOptionalFacetFilters\": [\n {\n \"facet\": \"lorem\",\n \"score\": 1,\n \"disjunctive\": false\n }\n ]\n },\n \"promote\": [\n {\n \"objectIDs\": [\n \"test-record-123\"\n ],\n \"position\": 0\n }\n ],\n \"filterPromotes\": false,\n \"hide\": [\n {\n \"objectID\": \"test-record-123\"\n }\n ],\n \"redirect\": {\n \"indexName\": \"lorem\"\n },\n \"userData\": {\n \"settingID\": \"f2a7b51e3503acc6a39b3784ffb84300\",\n \"pluginVersion\": \"1.6.0\"\n }\n },\n \"description\": \"Display a promotional banner\",\n \"enabled\": true,\n \"validity\": [\n {\n \"from\": 42,\n \"until\": 42\n }\n ],\n \"tags\": [\n \"lorem\"\n ],\n \"scope\": \"lorem\",\n \"condition\": {\n \"pattern\": \"{facet:genre}\",\n \"anchoring\": \"is\",\n \"alternatives\": false,\n \"context\": \"mobile\",\n \"filters\": \"genre:comedy\"\n }\n }\n]\n'"}],"requestExampleLanguages":["bash","csharp","dart","go","java","javascript","kotlin","php","python","ruby","scala","swift"],"requiredOnlyExamples":false,"disableCodeSampleGeneration":true,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"0fb5e6a6-a171-47a1-a6a4-d5e267aba34e":{"name":"indexName","in":"path","description":"Name of the index on which to perform the operation.","required":true,"schema":{"type":"string","example":"ALGOLIA_INDEX_NAME","isRequired":true,"description":"Name of the index on which to perform the operation.","uniqueKey":"","typeLabel":"string"}},"4482c05f-ca1f-4a96-a6aa-b775dd44f89d":{"in":"query","name":"clearExistingRules","required":false,"schema":{"type":"boolean","isRequired":false,"description":"Whether existing rules should be deleted before adding this batch.","uniqueKey":"","typeLabel":"boolean"},"description":"Whether existing rules should be deleted before adding this batch."},"38de6bf5-9d29-4ac6-b44b-ee071910c25a":{"in":"query","name":"forwardToReplicas","required":false,"description":"Whether changes are applied to replica indices.","schema":{"type":"boolean","isRequired":false,"description":"Whether changes are applied to replica indices.","uniqueKey":"","typeLabel":"boolean"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","description":"Rules to add or replace.","items":{"type":"object","description":"Rule object.","additionalProperties":false,"properties":{"consequence":{"type":"object","description":"Effect of the rule.\n\nFor more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).\n","additionalProperties":false,"properties":{"filterPromotes":{"type":"boolean","default":false,"description":"Determines whether promoted records must also match active filters for the consequence to apply.\n\nThis ensures user-applied filters take priority and irrelevant matches aren't shown.\nFor example, if you promote a record with `color: red` but the user filters for `color: blue`,\nthe \"red\" record won't be shown.\n\n> In the Algolia dashboard, when you use the **Pin an item** consequence, `filterPromotes` appears as the checkbox: **Pinned items must match active filters to be displayed.** For examples, see [Promote results with rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/#promote-results-matching-active-filters).\n","uniqueKey":"items.[INDEX].consequence.filterPromotes","typeLabel":"boolean"},"hide":{"type":"array","maxItems":50,"description":"Records you want to hide from the search results.","items":{"title":"consequenceHide","type":"object","description":"Object ID of the record to hide.","additionalProperties":false,"properties":{"objectID":{"type":"string","description":"Unique record identifier.","example":"test-record-123","isRequired":true,"uniqueKey":"items.[INDEX].consequence.hide.items.[INDEX].objectID","typeLabel":"string"}},"required":["objectID"],"uniqueKey":"items.[INDEX].consequence.hide.items.[INDEX]","typeLabel":"consequenceHide · object"},"uniqueKey":"items.[INDEX].consequence.hide","typeLabel":"consequenceHide · object[]"},"params":{"type":"object","properties":{"advancedSyntax":{"type":"boolean","description":"Whether to support phrase matching and excluding words from search queries.\nUse the `advancedSyntaxFeatures` parameter to control which feature is supported.\n","default":false,"x-categories":["Query strategy"],"uniqueKey":"items.[INDEX].consequence.params.advancedSyntax","typeLabel":"boolean"},"advancedSyntaxFeatures":{"type":"array","items":{"type":"string","enum":["exactPhrase","excludeWords"],"x-categories":["Query strategy"],"uniqueKey":"items.[INDEX].consequence.params.advancedSyntaxFeatures.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"Advanced search syntax features you want to support.\n- `exactPhrase`.\n Phrases in quotes must match exactly.\n For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".\n- `excludeWords`.\n Query words prefixed with a `-` must not occur in a record.\n For example, `search -engine` matches records that contain \"search\" but not \"engine\".\nThis setting only has an effect if `advancedSyntax` is true.\n","default":["exactPhrase","excludeWords"],"x-categories":["Query strategy"],"uniqueKey":"items.[INDEX].consequence.params.advancedSyntaxFeatures","typeLabel":"enum\u003cstring>[]"},"allowTyposOnNumericTokens":{"type":"boolean","description":"Whether to allow typos on numbers in the search query.\nTurn off this setting to reduce the number of irrelevant matches\nwhen searching in large sets of similar numbers.\n","default":true,"x-categories":["Typos"],"uniqueKey":"items.[INDEX].consequence.params.allowTyposOnNumericTokens","typeLabel":"boolean"},"alternativesAsExact":{"type":"array","items":{"type":"string","enum":["ignorePlurals","singleWordSynonym","multiWordsSynonym","ignoreConjugations"],"x-categories":["Query strategy"],"uniqueKey":"items.[INDEX].consequence.params.alternativesAsExact.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"Determine which plurals and synonyms should be considered an exact matches.\nBy default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.\nFor example:\n- \"swimsuit\" and \"swimsuits\" are treated the same.\n- \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)).\n- `ignorePlurals`.\n Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.\n- `singleWordSynonym`.\n Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches.\n- `multiWordsSynonym`.\n Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.\n","default":["ignorePlurals","singleWordSynonym"],"x-categories":["Query strategy"],"uniqueKey":"items.[INDEX].consequence.params.alternativesAsExact","typeLabel":"enum\u003cstring>[]"},"analytics":{"type":"boolean","description":"Whether this search will be included in Analytics.","default":true,"x-categories":["Analytics"],"uniqueKey":"items.[INDEX].consequence.params.analytics","typeLabel":"boolean"},"analyticsTags":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.analyticsTags.items.[INDEX]","typeLabel":"string"},"description":"Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).","default":[],"x-categories":["Analytics"],"uniqueKey":"items.[INDEX].consequence.params.analyticsTags","typeLabel":"string[]"},"aroundLatLng":{"type":"string","description":"Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.\n\nOnly records included within a circle around this central location are included in the results.\nThe radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings.\nThis parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.\n","example":"40.71,-74.01","default":"","x-categories":["Geo-Search"],"uniqueKey":"items.[INDEX].consequence.params.aroundLatLng","typeLabel":"string"},"aroundLatLngViaIP":{"type":"boolean","description":"Whether to obtain the coordinates from the request's IP address.","default":false,"x-categories":["Geo-Search"],"uniqueKey":"items.[INDEX].consequence.params.aroundLatLngViaIP","typeLabel":"boolean"},"aroundPrecision":{"oneOf":[{"type":"integer","description":"Precision of a coordinate-based search in meters to group results with similar distances.\n\nThe Geo ranking criterion considers all matches within the same range of distances to be equal.\n","default":10,"x-categories":["Geo-Search"],"uniqueKey":"items.[INDEX].consequence.params.aroundPrecision.oneOf.0","typeLabel":"integer"},{"type":"array","items":{"title":"range","type":"object","description":"Range object with lower and upper values in meters to define custom ranges.","properties":{"from":{"type":"integer","description":"Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.","example":20,"uniqueKey":"items.[INDEX].consequence.params.aroundPrecision.oneOf.1.items.[INDEX].from","typeLabel":"integer"},"value":{"type":"integer","description":"Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.","uniqueKey":"items.[INDEX].consequence.params.aroundPrecision.oneOf.1.items.[INDEX].value","typeLabel":"integer"}},"uniqueKey":"items.[INDEX].consequence.params.aroundPrecision.oneOf.1.items.[INDEX]","typeLabel":"range · object"},"title":"range objects","description":"Precision of a coordinate-based search in meters to group results with similar distances.\n\nThe Geo ranking criterion considers all matches within the same range of distances to be equal.\n","x-categories":["Geo-Search"],"uniqueKey":"items.[INDEX].consequence.params.aroundPrecision.oneOf.1","typeLabel":"range · object[]"}],"uniqueKey":"items.[INDEX].consequence.params.aroundPrecision","typeLabel":"integer | range · object[]"},"aroundRadius":{"oneOf":[{"type":"integer","description":"Maximum radius for a search around a central location.\n\nThis parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters.\nBy default, the search radius is determined automatically from the density of hits around the central location.\nThe search radius is small if there are many hits close to the central coordinates.\n","minimum":1,"x-categories":["Geo-Search"],"uniqueKey":"items.[INDEX].consequence.params.aroundRadius.oneOf.0","typeLabel":"integer"},{"type":"string","title":"all","description":"Maximum radius for a search around a central location.\n\nThis parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters.\nBy default, the search radius is determined automatically from the density of hits around the central location.\nThe search radius is small if there are many hits close to the central coordinates.\n","enum":["all"],"x-categories":["Geo-Search"],"uniqueKey":"items.[INDEX].consequence.params.aroundRadius.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"items.[INDEX].consequence.params.aroundRadius","typeLabel":"integer | enum\u003cstring>"},"attributeCriteriaComputedBy":{"type":"string","title":"attribute criteria computed by","enum":["minProximity","best","sum"],"description":"Strategy for computing the Attribute ranking criterion.\nThis mainly affects multi-word queries with matches in more than one attribute.\n\nThe `ranking` setting decides whether `best` takes effect.\nWhen Attribute comes after Proximity, which is the default order, the engine always uses the `minProximity` strategy and ignores `best`.\nTo select `best`, move Attribute before Proximity in `ranking`.\nThe `sum` strategy applies in both orders.\n\n- `minProximity`.\n Pick the best matching attribute from the attributes that form the best proximity score.\n On an ordered attribute, the match position breaks ties.\n- `best`.\n Pick the best matching attribute from all attributes that match any query word.\n On an ordered attribute, the match position breaks ties.\n- `sum`.\n Add up a score for every query word instead of picking one attribute.\n Each word's score comes from the attribute it matched, and from its position in that attribute when the attribute is ordered.\n A query word that matches nothing adds a large penalty.\n A record with a lower total ranks higher.\n A record therefore cannot rank high only because one word of a multi-word query matched a top attribute.\n Use `sum` with short, relevant attributes, and set long-text attributes to unordered.\n","default":"best","x-categories":["Advanced"],"uniqueKey":"items.[INDEX].consequence.params.attributeCriteriaComputedBy","typeLabel":"enum\u003cstring>"},"attributeCriteriaComputedByMinProximity":{"type":"boolean","description":"Whether the best matching attribute should be determined by minimum proximity.\nThis setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting.\nIf true, the best matching attribute is selected based on the minimum proximity of multiple matches.\nOtherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.\n\nPrefer `attributeCriteriaComputedBy`, which expresses the same two behaviors and adds the `sum` strategy.\nIf you set both, `attributeCriteriaComputedBy` takes precedence.\n","default":false,"x-categories":["Advanced"],"uniqueKey":"items.[INDEX].consequence.params.attributeCriteriaComputedByMinProximity","typeLabel":"boolean"},"attributesToHighlight":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.attributesToHighlight.items.[INDEX]","typeLabel":"string"},"example":["author","title","conten","content"],"description":"Attributes to highlight.\nBy default, all searchable attributes are highlighted.\nUse `*` to highlight all attributes or use an empty array `[]` to turn off highlighting.\nAttribute names are case-sensitive\nWith highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`.\nYou can use this to visually highlight matching parts of a search query in your UI\nFor more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js).\n","x-categories":["Highlighting and Snippeting"],"uniqueKey":"items.[INDEX].consequence.params.attributesToHighlight","typeLabel":"string[]"},"attributesToRetrieve":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.attributesToRetrieve.items.[INDEX]","typeLabel":"string"},"example":["author","title","content"],"description":"Attributes to include in the API response.\nTo reduce the size of your response, you can retrieve only some of the attributes.\nAttribute names are case-sensitive\n- `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings.\n- To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`.\n- The `objectID` attribute is always included.\n","default":["*"],"x-categories":["Attributes"],"uniqueKey":"items.[INDEX].consequence.params.attributesToRetrieve","typeLabel":"string[]"},"attributesToSnippet":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.attributesToSnippet.items.[INDEX]","typeLabel":"string"},"example":["content:80","description"],"description":"Attributes for which to enable snippets.\nAttribute names are case-sensitive\nSnippets provide additional context to matched words.\nIf you enable snippets, they include 10 words, including the matched word.\nThe matched word will also be wrapped by HTML tags for highlighting.\nYou can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`,\nwhere `NUMBER` is the number of words to be extracted.\n","default":[],"x-categories":["Highlighting and Snippeting"],"uniqueKey":"items.[INDEX].consequence.params.attributesToSnippet","typeLabel":"string[]"},"automaticFacetFilters":{"oneOf":[{"type":"array","items":{"type":"object","description":"Filter or optional filter to be applied to the search.","additionalProperties":false,"properties":{"facet":{"type":"string","description":"Facet name to be applied as filter.\nThe name must match placeholders in the `pattern` parameter.\nFor example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`.\n","isRequired":true,"uniqueKey":"items.[INDEX].consequence.params.automaticFacetFilters.oneOf.0.items.[INDEX].facet","typeLabel":"string"},"disjunctive":{"type":"boolean","default":false,"description":"Whether the filter is disjunctive or conjunctive.\n\nIf true the filter has multiple matches, multiple occurrences are combined with the logical `OR` operation.\nIf false, multiple occurrences are combined with the logical `AND` operation.\n","uniqueKey":"items.[INDEX].consequence.params.automaticFacetFilters.oneOf.0.items.[INDEX].disjunctive","typeLabel":"boolean"},"score":{"type":"integer","default":1,"description":"Filter scores to give different weights to individual filters.","uniqueKey":"items.[INDEX].consequence.params.automaticFacetFilters.oneOf.0.items.[INDEX].score","typeLabel":"integer"}},"required":["facet"],"uniqueKey":"items.[INDEX].consequence.params.automaticFacetFilters.oneOf.0.items.[INDEX]","typeLabel":"object"},"description":"Filter to be applied to the search.\n\nYou can use this to respond to search queries that match a facet value.\nFor example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet,\nyou can filter the results to show the top-ranked comedy movies.\n","uniqueKey":"items.[INDEX].consequence.params.automaticFacetFilters.oneOf.0","typeLabel":"object[]"},{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.automaticFacetFilters.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Filter to be applied to the search.\n\nYou can use this to respond to search queries that match a facet value.\nFor example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet,\nyou can filter the results to show the top-ranked comedy movies.\n","uniqueKey":"items.[INDEX].consequence.params.automaticFacetFilters.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"items.[INDEX].consequence.params.automaticFacetFilters","typeLabel":"object[] | string[]"},"automaticOptionalFacetFilters":{"oneOf":[{"type":"array","items":{"type":"object","description":"Filter or optional filter to be applied to the search.","additionalProperties":false,"properties":{"facet":{"type":"string","description":"Facet name to be applied as filter.\nThe name must match placeholders in the `pattern` parameter.\nFor example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`.\n","isRequired":true,"uniqueKey":"items.[INDEX].consequence.params.automaticOptionalFacetFilters.oneOf.0.items.[INDEX].facet","typeLabel":"string"},"disjunctive":{"type":"boolean","default":false,"description":"Whether the filter is disjunctive or conjunctive.\n\nIf true the filter has multiple matches, multiple occurrences are combined with the logical `OR` operation.\nIf false, multiple occurrences are combined with the logical `AND` operation.\n","uniqueKey":"items.[INDEX].consequence.params.automaticOptionalFacetFilters.oneOf.0.items.[INDEX].disjunctive","typeLabel":"boolean"},"score":{"type":"integer","default":1,"description":"Filter scores to give different weights to individual filters.","uniqueKey":"items.[INDEX].consequence.params.automaticOptionalFacetFilters.oneOf.0.items.[INDEX].score","typeLabel":"integer"}},"required":["facet"],"uniqueKey":"items.[INDEX].consequence.params.automaticOptionalFacetFilters.oneOf.0.items.[INDEX]","typeLabel":"object"},"description":"Filter to be applied to the search.\n\nYou can use this to respond to search queries that match a facet value.\nFor example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet,\nyou can filter the results to show the top-ranked comedy movies.\n","uniqueKey":"items.[INDEX].consequence.params.automaticOptionalFacetFilters.oneOf.0","typeLabel":"object[]"},{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.automaticOptionalFacetFilters.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Filter to be applied to the search.\n\nYou can use this to respond to search queries that match a facet value.\nFor example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet,\nyou can filter the results to show the top-ranked comedy movies.\n","uniqueKey":"items.[INDEX].consequence.params.automaticOptionalFacetFilters.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"items.[INDEX].consequence.params.automaticOptionalFacetFilters","typeLabel":"object[] | string[]"},"clickAnalytics":{"type":"boolean","description":"Whether to include a `queryID` attribute in the response.\nThe query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started).\n","default":false,"x-categories":["Analytics"],"uniqueKey":"items.[INDEX].consequence.params.clickAnalytics","typeLabel":"boolean"},"decompoundQuery":{"type":"boolean","description":"Whether to split compound words in the query into their building blocks.\nFor more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#split-compound-words).\nWord segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.\nDecompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).\nFor example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).\n","default":true,"x-categories":["Languages"],"uniqueKey":"items.[INDEX].consequence.params.decompoundQuery","typeLabel":"boolean"},"disableExactOnAttributes":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.disableExactOnAttributes.items.[INDEX]","typeLabel":"string"},"example":["description"],"description":"Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).\nAttribute names are case-sensitive\nThis can be useful for attributes with long values, where the likelihood of an exact match is high,\nsuch as product descriptions.\nTurning off the Exact ranking criterion for these attributes favors exact matching on other attributes.\nThis reduces the impact of individual attributes with a lot of content on ranking.\n","default":[],"x-categories":["Query strategy"],"uniqueKey":"items.[INDEX].consequence.params.disableExactOnAttributes","typeLabel":"string[]"},"disableTypoToleranceOnAttributes":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.disableTypoToleranceOnAttributes.items.[INDEX]","typeLabel":"string"},"example":["sku"],"description":"Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance).\nAttribute names are case-sensitive\nReturning only exact matches can help when\n- [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes).\n- Reducing the number of matches when you have too many.\n This can happen with attributes that are long blocks of text, such as product descriptions.\nConsider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.\n","default":[],"x-categories":["Typos"],"uniqueKey":"items.[INDEX].consequence.params.disableTypoToleranceOnAttributes","typeLabel":"string[]"},"distinct":{"oneOf":[{"type":"boolean","description":"Determines how many records of a group are included in the search results.\n\nRecords with the same value for the `attributeForDistinct` attribute are considered a group.\nThe `distinct` setting controls how many members of the group are returned.\nThis is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#deduplicate-results-with-distinct).\n\nThe `distinct` setting is ignored if `attributeForDistinct` is not set.\n","x-categories":["Advanced"],"example":1,"uniqueKey":"items.[INDEX].consequence.params.distinct.oneOf.0","typeLabel":"boolean"},{"type":"integer","description":"Determines how many records of a group are included in the search results.\n\nRecords with the same value for the `attributeForDistinct` attribute are considered a group.\nThe `distinct` setting controls how many members of the group are returned.\nThis is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#deduplicate-results-with-distinct).\n\nThe `distinct` setting is ignored if `attributeForDistinct` is not set.\n","default":0,"maximum":4,"minimum":0,"x-categories":["Advanced"],"example":1,"uniqueKey":"items.[INDEX].consequence.params.distinct.oneOf.1","typeLabel":"integer"}],"uniqueKey":"items.[INDEX].consequence.params.distinct","typeLabel":"boolean | integer"},"enableABTest":{"type":"boolean","description":"Whether to enable A/B testing for this search.","default":true,"x-categories":["Advanced"],"uniqueKey":"items.[INDEX].consequence.params.enableABTest","typeLabel":"boolean"},"enablePersonalization":{"type":"boolean","description":"Whether to enable Personalization.","default":false,"x-categories":["Personalization"],"uniqueKey":"items.[INDEX].consequence.params.enablePersonalization","typeLabel":"boolean"},"enableReRanking":{"type":"boolean","description":"Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking).\nThis setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.\n","default":true,"x-categories":["Filtering"],"uniqueKey":"items.[INDEX].consequence.params.enableReRanking","typeLabel":"boolean"},"enableRules":{"type":"boolean","description":"Whether to enable rules.","default":true,"x-categories":["Rules"],"uniqueKey":"items.[INDEX].consequence.params.enableRules","typeLabel":"boolean"},"exactOnSingleWordQuery":{"type":"string","enum":["attribute","none","word"],"description":"Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.\n\n- `attribute`.\n The Exact ranking criterion is 1 if the query word and attribute value are the same.\n For example, a search for \"road\" will match the value \"road\", but not \"road trip\".\n\n- `none`.\n The Exact ranking criterion is ignored on single-word searches.\n\n- `word`.\n The Exact ranking criterion is 1 if the query word is found in the attribute value.\n The query word must have at least 3 characters and must not be a stop word.\n Only exact matches will be highlighted,\n partial and prefix matches won't.\n","default":"attribute","x-categories":["Query strategy"],"uniqueKey":"items.[INDEX].consequence.params.exactOnSingleWordQuery","typeLabel":"enum\u003cstring>"},"facetFilters":{"oneOf":[{"type":"array","items":{"oneOf":[{}],"uniqueKey":"items.[INDEX].consequence.params.facetFilters.oneOf.0.items.[INDEX]","typeLabel":"any"},"description":"Filter the search by facet values, so that only records with the same facet values are retrieved.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\n- `[filter1, filter2]` is interpreted as `filter1 AND filter2`.\n- `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`.\n- `facet:-value` is interpreted as `NOT facet:value`.\n\nWhile it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash:\n`facet:\\-value`.\n","x-categories":["Filtering"],"example":[["category:Book","category:-Movie"],"author:John Doe"],"uniqueKey":"items.[INDEX].consequence.params.facetFilters.oneOf.0","typeLabel":"any[]"},{"type":"string","description":"Filter the search by facet values, so that only records with the same facet values are retrieved.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\n- `[filter1, filter2]` is interpreted as `filter1 AND filter2`.\n- `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`.\n- `facet:-value` is interpreted as `NOT facet:value`.\n\nWhile it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash:\n`facet:\\-value`.\n","x-categories":["Filtering"],"example":[["category:Book","category:-Movie"],"author:John Doe"],"uniqueKey":"items.[INDEX].consequence.params.facetFilters.oneOf.1","typeLabel":"string"}],"uniqueKey":"items.[INDEX].consequence.params.facetFilters","typeLabel":"any[] | string"},"facetingAfterDistinct":{"type":"boolean","description":"Whether faceting should be applied after deduplication with `distinct`.\nThis leads to accurate facet counts when using faceting in combination with `distinct`.\nIt's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting,\nas `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.\n","default":false,"x-categories":["Faceting"],"uniqueKey":"items.[INDEX].consequence.params.facetingAfterDistinct","typeLabel":"boolean"},"facets":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.facets.items.[INDEX]","typeLabel":"string"},"description":"Facets for which to retrieve facet values that match the search criteria and the number of matching facet values.\nTo retrieve all facets, use the wildcard character `*`.\nFor more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).\n","default":[],"example":["*"],"x-categories":["Faceting"],"uniqueKey":"items.[INDEX].consequence.params.facets","typeLabel":"string[]"},"filters":{"type":"string","description":"Filter expression to only include items that match the filter criteria in the response.\n\nYou can use these filter expressions:\n\n- **Numeric filters.** `\u003cfacet> \u003cop> \u003cnumber>`, where `\u003cop>` is one of `\u003c`, `\u003c=`, `=`, `!=`, `>`, `>=`.\n- **Ranges.** `\u003cfacet>:\u003clower> TO \u003cupper>`, where `\u003clower>` and `\u003cupper>` are the lower and upper limits of the range (inclusive).\n- **Facet filters.** `\u003cfacet>:\u003cvalue>`, where `\u003cfacet>` is a facet attribute (case-sensitive) and `\u003cvalue>` a facet value.\n- **Tag filters.** `_tags:\u003cvalue>` or just `\u003cvalue>` (case-sensitive).\n- **Boolean filters.** `\u003cfacet>: true | false`.\n\nYou can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions:\n\n- You can only combine filters of the same type with `OR`.\n **Not supported:** `facet:value OR num > 3`.\n- You can't use `NOT` with combinations of filters.\n **Not supported:** `NOT(facet:value OR facet:value)`\n- You can't combine conjunctions (`AND`) with `OR`.\n **Not supported:** `facet:value OR (facet:value AND facet:value)`\n\nUse quotes if the facet attribute name or facet value contains spaces, keywords (`OR`, `AND`, `NOT`), or quotes.\nIf a facet attribute is an array, the filter matches if it matches at least one element of the array.\n\nFor more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).\n","example":"(category:Book OR category:Ebook) AND _tags:published","x-categories":["Filtering"],"uniqueKey":"items.[INDEX].consequence.params.filters","typeLabel":"string"},"getRankingInfo":{"type":"boolean","description":"Whether the search response should include detailed ranking information.","default":false,"x-categories":["Advanced"],"uniqueKey":"items.[INDEX].consequence.params.getRankingInfo","typeLabel":"boolean"},"highlightPostTag":{"type":"string","description":"HTML tag to insert after the highlighted parts in all highlighted results and snippets.","default":"\u003c/em>","x-categories":["Highlighting and Snippeting"],"uniqueKey":"items.[INDEX].consequence.params.highlightPostTag","typeLabel":"string"},"highlightPreTag":{"type":"string","description":"HTML tag to insert before the highlighted parts in all highlighted results and snippets.","default":"\u003cem>","x-categories":["Highlighting and Snippeting"],"uniqueKey":"items.[INDEX].consequence.params.highlightPreTag","typeLabel":"string"},"hitsPerPage":{"type":"integer","description":"Number of hits per page.","default":20,"minimum":1,"maximum":1000,"x-categories":["Pagination"],"uniqueKey":"items.[INDEX].consequence.params.hitsPerPage","typeLabel":"integer"},"ignorePlurals":{"oneOf":[{"type":"array","items":{"type":"string","description":"ISO code for a supported language.","enum":["af","ar","az","bg","bn","ca","cs","cy","da","de","el","en","eo","es","et","eu","fa","fi","fo","fr","ga","gl","he","hi","hu","hy","id","is","it","ja","ka","kk","ko","ku","ky","lt","lv","mi","mn","mr","ms","mt","nb","nl","no","ns","pl","ps","pt","pt-br","qu","ro","ru","sk","sq","sv","sw","ta","te","th","tl","tn","tr","tt","uk","ur","uz","zh"],"uniqueKey":"items.[INDEX].consequence.params.ignorePlurals.oneOf.0.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"Treat singular, plurals, and other forms of declensions as equivalent.\nOnly use this feature for the languages used in your index.\n","x-categories":["Languages"],"example":["ca","es"],"uniqueKey":"items.[INDEX].consequence.params.ignorePlurals.oneOf.0","typeLabel":"enum\u003cstring>[]"},{"type":"string","description":"Treat singular, plurals, and other forms of declensions as equivalent.\nOnly use this feature for the languages used in your index.\n","enum":["true","false"],"x-categories":["Languages"],"example":["ca","es"],"uniqueKey":"items.[INDEX].consequence.params.ignorePlurals.oneOf.1","typeLabel":"enum\u003cstring>"},{"type":"boolean","description":"Treat singular, plurals, and other forms of declensions as equivalent.\nOnly use this feature for the languages used in your index.\n","default":false,"x-categories":["Languages"],"example":["ca","es"],"uniqueKey":"items.[INDEX].consequence.params.ignorePlurals.oneOf.2","typeLabel":"boolean"}],"uniqueKey":"items.[INDEX].consequence.params.ignorePlurals","typeLabel":"enum\u003cstring>[] | enum\u003cstring> | boolean"},"insideBoundingBox":{"oneOf":[{"type":"string","uniqueKey":"items.[INDEX].consequence.params.insideBoundingBox.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"items.[INDEX].consequence.params.insideBoundingBox.oneOf.1","typeLabel":"null"},{"type":"array","items":{"type":"array","minItems":4,"maxItems":4,"items":{"type":"number","format":"double","uniqueKey":"items.[INDEX].consequence.params.insideBoundingBox.oneOf.2.items.[INDEX].items.[INDEX]","typeLabel":"number\u003cdouble>"},"uniqueKey":"items.[INDEX].consequence.params.insideBoundingBox.oneOf.2.items.[INDEX]","typeLabel":"number\u003cdouble>[]"},"description":"Coordinates for a rectangular area in which to search.\n\nEach bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair:\n`[p1 lat, p1 long, p2 lat, p2 long]`.\nProvide multiple bounding boxes as nested arrays.\nFor more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\n","x-categories":["Geo-Search"],"example":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"uniqueKey":"items.[INDEX].consequence.params.insideBoundingBox.oneOf.2","typeLabel":"number\u003cdouble>[][]"}],"uniqueKey":"items.[INDEX].consequence.params.insideBoundingBox","typeLabel":"string | null | number\u003cdouble>[][]"},"insidePolygon":{"type":"array","items":{"type":"array","minItems":6,"maxItems":20000,"items":{"type":"number","format":"double","uniqueKey":"items.[INDEX].consequence.params.insidePolygon.items.[INDEX].items.[INDEX]","typeLabel":"number\u003cdouble>"},"uniqueKey":"items.[INDEX].consequence.params.insidePolygon.items.[INDEX]","typeLabel":"number\u003cdouble>[]"},"description":"Coordinates of a polygon in which to search.\n\nPolygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude.\nProvide multiple polygons as nested arrays.\nFor more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\nThis parameter is ignored if you also specify `insideBoundingBox`.\n","example":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"x-categories":["Geo-Search"],"uniqueKey":"items.[INDEX].consequence.params.insidePolygon","typeLabel":"number\u003cdouble>[][]"},"length":{"type":"integer","description":"Number of hits to retrieve (used in combination with `offset`).","minimum":0,"maximum":1000,"x-categories":["Pagination"],"uniqueKey":"items.[INDEX].consequence.params.length","typeLabel":"integer"},"maxValuesPerFacet":{"type":"integer","description":"Maximum number of facet values to return for each facet.","default":100,"maximum":1000,"x-categories":["Faceting"],"uniqueKey":"items.[INDEX].consequence.params.maxValuesPerFacet","typeLabel":"integer"},"minimumAroundRadius":{"type":"integer","description":"Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.","minimum":1,"x-categories":["Geo-Search"],"uniqueKey":"items.[INDEX].consequence.params.minimumAroundRadius","typeLabel":"integer"},"minProximity":{"type":"integer","minimum":1,"maximum":7,"description":"Minimum proximity score for two matching words.\nThis adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity)\nby equally scoring matches that are farther apart\nFor example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.\n","default":1,"x-categories":["Advanced"],"uniqueKey":"items.[INDEX].consequence.params.minProximity","typeLabel":"integer"},"minWordSizefor1Typo":{"type":"integer","description":"Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configure-word-size-threshold-for-typos).","default":4,"x-categories":["Typos"],"uniqueKey":"items.[INDEX].consequence.params.minWordSizefor1Typo","typeLabel":"integer"},"minWordSizefor2Typos":{"type":"integer","description":"Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configure-word-size-threshold-for-typos).","default":8,"x-categories":["Typos"],"uniqueKey":"items.[INDEX].consequence.params.minWordSizefor2Typos","typeLabel":"integer"},"mode":{"type":"string","enum":["neuralSearch","keywordSearch"],"description":"Search mode the index will use to query for results.\n\nThis setting only applies to indices, for which Algolia enabled NeuralSearch for you.\n","default":"keywordSearch","x-categories":["Query strategy"],"uniqueKey":"items.[INDEX].consequence.params.mode","typeLabel":"enum\u003cstring>"},"naturalLanguages":{"type":"array","items":{"type":"string","description":"ISO code for a supported language.","enum":["af","ar","az","bg","bn","ca","cs","cy","da","de","el","en","eo","es","et","eu","fa","fi","fo","fr","ga","gl","he","hi","hu","hy","id","is","it","ja","ka","kk","ko","ku","ky","lt","lv","mi","mn","mr","ms","mt","nb","nl","no","ns","pl","ps","pt","pt-br","qu","ro","ru","sk","sq","sv","sw","ta","te","th","tl","tn","tr","tt","uk","ur","uz","zh"],"uniqueKey":"items.[INDEX].consequence.params.naturalLanguages.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches).\n- Sets `removeStopWords` and `ignorePlurals` to the list of provided languages.\n- Sets `removeWordsIfNoResults` to `allOptional`.\n- Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.\n","default":[],"x-categories":["Languages"],"uniqueKey":"items.[INDEX].consequence.params.naturalLanguages","typeLabel":"enum\u003cstring>[]"},"numericFilters":{"oneOf":[{"type":"array","items":{"oneOf":[{}],"uniqueKey":"items.[INDEX].consequence.params.numericFilters.oneOf.0.items.[INDEX]","typeLabel":"any"},"description":"Filter by numeric facets.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nYou can use numeric comparison operators: `\u003c`, `\u003c=`, `=`, `!=`, `>`, `>=`.\nComparisons are precise up to 3 decimals.\nYou can also provide ranges: `facet:\u003clower> TO \u003cupper>`. The range includes the lower and upper boundaries.\nThe same combination rules apply as for `facetFilters`.\n","x-categories":["Filtering"],"example":[["inStock = 1","deliveryDate \u003c 1441755506"],"price \u003c 1000"],"uniqueKey":"items.[INDEX].consequence.params.numericFilters.oneOf.0","typeLabel":"any[]"},{"type":"string","description":"Filter by numeric facets.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nYou can use numeric comparison operators: `\u003c`, `\u003c=`, `=`, `!=`, `>`, `>=`.\nComparisons are precise up to 3 decimals.\nYou can also provide ranges: `facet:\u003clower> TO \u003cupper>`. The range includes the lower and upper boundaries.\nThe same combination rules apply as for `facetFilters`.\n","x-categories":["Filtering"],"example":[["inStock = 1","deliveryDate \u003c 1441755506"],"price \u003c 1000"],"uniqueKey":"items.[INDEX].consequence.params.numericFilters.oneOf.1","typeLabel":"string"}],"uniqueKey":"items.[INDEX].consequence.params.numericFilters","typeLabel":"any[] | string"},"offset":{"type":"integer","description":"Position of the first hit to retrieve.","x-categories":["Pagination"],"uniqueKey":"items.[INDEX].consequence.params.offset","typeLabel":"integer"},"optionalFilters":{"oneOf":[{"type":"array","items":{"oneOf":[{}],"uniqueKey":"items.[INDEX].consequence.params.optionalFilters.oneOf.0.items.[INDEX]","typeLabel":"any"},"description":"Filters to promote or demote records in the search results.\n\nOptional filters work like facet filters, but they don't exclude records from the search results.\nRecords that match the optional filter rank before records that don't match.\nIf you're using a negative filter `facet:-value`, matching records rank after records that don't match.\n\n- Optional filters are applied _after_ sort-by attributes.\n- Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)).\n- Optional filters don't work with numeric attributes.\n- On virtual replicas, optional filters are applied _after_ the replica's [relevant sort](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort).\n","x-categories":["Filtering"],"example":["category:Book","author:John Doe"],"uniqueKey":"items.[INDEX].consequence.params.optionalFilters.oneOf.0","typeLabel":"any[]"},{"type":"string","description":"Filters to promote or demote records in the search results.\n\nOptional filters work like facet filters, but they don't exclude records from the search results.\nRecords that match the optional filter rank before records that don't match.\nIf you're using a negative filter `facet:-value`, matching records rank after records that don't match.\n\n- Optional filters are applied _after_ sort-by attributes.\n- Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)).\n- Optional filters don't work with numeric attributes.\n- On virtual replicas, optional filters are applied _after_ the replica's [relevant sort](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort).\n","x-categories":["Filtering"],"example":["category:Book","author:John Doe"],"uniqueKey":"items.[INDEX].consequence.params.optionalFilters.oneOf.1","typeLabel":"string"}],"uniqueKey":"items.[INDEX].consequence.params.optionalFilters","typeLabel":"any[] | string"},"optionalWords":{"oneOf":[{"type":"string","description":"Words that should be considered optional when found in the query.\n\nBy default, records must match all words in the search query to be included in the search results.\nAdding optional words can increase the number of search results by running an additional search query that doesn't include the optional words.\nFor example, if the search query is \"action video\" and \"video\" is optional,\nthe search engine runs two queries: one for \"action video\" and one for \"action\".\nRecords that match all words are ranked higher.\n\nFor a search query with 4 or more words **and** all its words are optional,\nthe number of matched words required for a record to be included in the search results increases for every 1,000 records:\n\n- If `optionalWords` has fewer than 10 words, the required number of matched words increases by 1:\n results 1 to 1,000 require 1 matched word; results 1,001 to 2,000 need 2 matched words.\n- If `optionalWords` has 10 or more words, the required number of matched words increases by the number of optional words divided by 5 (rounded down).\n Example: with 18 optional words, results 1 to 1,000 require 1 matched word; results 1,001 to 2,000 need 4 matched words.\n\nFor more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#create-a-list-of-optional-words).\n","uniqueKey":"items.[INDEX].consequence.params.optionalWords.oneOf.0","typeLabel":"string"},{"type":"null","description":"Words that should be considered optional when found in the query.\n\nBy default, records must match all words in the search query to be included in the search results.\nAdding optional words can increase the number of search results by running an additional search query that doesn't include the optional words.\nFor example, if the search query is \"action video\" and \"video\" is optional,\nthe search engine runs two queries: one for \"action video\" and one for \"action\".\nRecords that match all words are ranked higher.\n\nFor a search query with 4 or more words **and** all its words are optional,\nthe number of matched words required for a record to be included in the search results increases for every 1,000 records:\n\n- If `optionalWords` has fewer than 10 words, the required number of matched words increases by 1:\n results 1 to 1,000 require 1 matched word; results 1,001 to 2,000 need 2 matched words.\n- If `optionalWords` has 10 or more words, the required number of matched words increases by the number of optional words divided by 5 (rounded down).\n Example: with 18 optional words, results 1 to 1,000 require 1 matched word; results 1,001 to 2,000 need 4 matched words.\n\nFor more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#create-a-list-of-optional-words).\n","uniqueKey":"items.[INDEX].consequence.params.optionalWords.oneOf.1","typeLabel":"null"},{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.optionalWords.oneOf.2.items.[INDEX]","typeLabel":"string"},"description":"Words that should be considered optional when found in the query.\n\nBy default, records must match all words in the search query to be included in the search results.\nAdding optional words can increase the number of search results by running an additional search query that doesn't include the optional words.\nFor example, if the search query is \"action video\" and \"video\" is optional,\nthe search engine runs two queries: one for \"action video\" and one for \"action\".\nRecords that match all words are ranked higher.\n\nFor a search query with 4 or more words **and** all its words are optional,\nthe number of matched words required for a record to be included in the search results increases for every 1,000 records:\n\n- If `optionalWords` has fewer than 10 words, the required number of matched words increases by 1:\n results 1 to 1,000 require 1 matched word; results 1,001 to 2,000 need 2 matched words.\n- If `optionalWords` has 10 or more words, the required number of matched words increases by the number of optional words divided by 5 (rounded down).\n Example: with 18 optional words, results 1 to 1,000 require 1 matched word; results 1,001 to 2,000 need 4 matched words.\n\nFor more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#create-a-list-of-optional-words).\n","default":[],"x-categories":["Query strategy"],"example":["blue","iphone case"],"uniqueKey":"items.[INDEX].consequence.params.optionalWords.oneOf.2","typeLabel":"string[]"}],"uniqueKey":"items.[INDEX].consequence.params.optionalWords","typeLabel":"string | null | string[]"},"page":{"type":"integer","description":"Page of search results to retrieve.","default":0,"minimum":0,"x-categories":["Pagination"],"uniqueKey":"items.[INDEX].consequence.params.page","typeLabel":"integer"},"percentileComputation":{"type":"boolean","description":"Whether to include this search when calculating processing-time percentiles.","default":true,"x-categories":["Advanced"],"uniqueKey":"items.[INDEX].consequence.params.percentileComputation","typeLabel":"boolean"},"personalizationImpact":{"type":"integer","description":"Impact that Personalization should have on this search.\nThe higher this value is, the more Personalization determines the ranking compared to other factors.\nFor more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).\n","default":100,"minimum":0,"maximum":100,"x-categories":["Personalization"],"uniqueKey":"items.[INDEX].consequence.params.personalizationImpact","typeLabel":"integer"},"query":{"oneOf":[{"type":"object","description":"Replace or edit the search query.\n\nIf `consequenceQuery` is a string, the entire search query is replaced with that string.\nIf `consequenceQuery` is an object, it describes incremental edits made to the query.\n","properties":{"edits":{"description":"Changes to make to the search query.","type":"array","items":{"type":"object","additionalProperties":false,"properties":{"delete":{"description":"Text or patterns to remove from the query string.","type":"string","uniqueKey":"items.[INDEX].consequence.params.query.oneOf.0.edits.items.[INDEX].delete","typeLabel":"string"},"insert":{"description":"Text to be added in place of the deleted text inside the query string.","type":"string","uniqueKey":"items.[INDEX].consequence.params.query.oneOf.0.edits.items.[INDEX].insert","typeLabel":"string"},"type":{"description":"Type of edit.","type":"string","enum":["remove","replace"],"uniqueKey":"items.[INDEX].consequence.params.query.oneOf.0.edits.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"items.[INDEX].consequence.params.query.oneOf.0.edits.items.[INDEX]","typeLabel":"object"},"uniqueKey":"items.[INDEX].consequence.params.query.oneOf.0.edits","typeLabel":"object[]"},"remove":{"description":"Words to remove from the search query.","type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.query.oneOf.0.remove.items.[INDEX]","typeLabel":"string"},"uniqueKey":"items.[INDEX].consequence.params.query.oneOf.0.remove","typeLabel":"string[]"}},"additionalProperties":false,"uniqueKey":"items.[INDEX].consequence.params.query.oneOf.0","typeLabel":"object"},{"type":"string","description":"Replace or edit the search query.\n\nIf `consequenceQuery` is a string, the entire search query is replaced with that string.\nIf `consequenceQuery` is an object, it describes incremental edits made to the query.\n","uniqueKey":"items.[INDEX].consequence.params.query.oneOf.1","typeLabel":"string"}],"uniqueKey":"items.[INDEX].consequence.params.query","typeLabel":"object | string"},"queryLanguages":{"type":"array","items":{"type":"string","description":"ISO code for a supported language.","enum":["af","ar","az","bg","bn","ca","cs","cy","da","de","el","en","eo","es","et","eu","fa","fi","fo","fr","ga","gl","he","hi","hu","hy","id","is","it","ja","ka","kk","ko","ku","ky","lt","lv","mi","mn","mr","ms","mt","nb","nl","no","ns","pl","ps","pt","pt-br","qu","ro","ru","sk","sq","sv","sw","ta","te","th","tl","tn","tr","tt","uk","ur","uz","zh"],"uniqueKey":"items.[INDEX].consequence.params.queryLanguages.items.[INDEX]","typeLabel":"enum\u003cstring>"},"example":["es"],"description":"Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries.\nThis setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings.\nThis setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages.\nTo support this, place the CJK language **first**.\n**Always specify a query language.**\nIf you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).\n","default":[],"x-categories":["Languages"],"uniqueKey":"items.[INDEX].consequence.params.queryLanguages","typeLabel":"enum\u003cstring>[]"},"queryType":{"type":"string","enum":["prefixLast","prefixAll","prefixNone"],"description":"Determines if and how query words are interpreted as prefixes.\n\nBy default, only the last query word is treated as a prefix (`prefixLast`).\nTo turn off prefix search, use `prefixNone`.\nAvoid `prefixAll`, which treats all query words as prefixes.\nThis might lead to counterintuitive results and makes your search slower.\n\nFor more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching).\n","default":"prefixLast","x-categories":["Query strategy"],"uniqueKey":"items.[INDEX].consequence.params.queryType","typeLabel":"enum\u003cstring>"},"ranking":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.ranking.items.[INDEX]","typeLabel":"string"},"description":"Determines the order in which Algolia returns your results.\n\nBy default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria).\nThe tie-breaking algorithm sequentially applies each criterion in the order they're specified.\nIf you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute),\nyou put the sorting attribute at the top of the list.\n\n**Modifiers**\n\n- `asc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in ascending order.\n- `desc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in descending order.\n\nBefore you modify the default setting,\ntest your changes in the dashboard,\nand by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing).\n","default":["typo","geo","words","filters","proximity","attribute","exact","custom"],"x-categories":["Ranking"],"uniqueKey":"items.[INDEX].consequence.params.ranking","typeLabel":"string[]"},"relevancyStrictness":{"type":"integer","example":90,"description":"Relevancy threshold below which less relevant results aren't included in the results.\nYou can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#standard-and-virtual-replicas).\nUse this setting to strike a balance between the relevance and number of returned results.\n","default":100,"x-categories":["Ranking"],"uniqueKey":"items.[INDEX].consequence.params.relevancyStrictness","typeLabel":"integer"},"removeStopWords":{"oneOf":[{"type":"array","items":{"type":"string","description":"ISO code for a supported language.","enum":["af","ar","az","bg","bn","ca","cs","cy","da","de","el","en","eo","es","et","eu","fa","fi","fo","fr","ga","gl","he","hi","hu","hy","id","is","it","ja","ka","kk","ko","ku","ky","lt","lv","mi","mn","mr","ms","mt","nb","nl","no","ns","pl","ps","pt","pt-br","qu","ro","ru","sk","sq","sv","sw","ta","te","th","tl","tn","tr","tt","uk","ur","uz","zh"],"uniqueKey":"items.[INDEX].consequence.params.removeStopWords.oneOf.0.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"Removes stop words from the search query.\n\nStop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own.\nIn English, \"the\", \"a\", or \"and\" are stop words.\n\nOnly use this feature for the languages used in your index.\n","x-categories":["Languages"],"example":["ca","es"],"uniqueKey":"items.[INDEX].consequence.params.removeStopWords.oneOf.0","typeLabel":"enum\u003cstring>[]"},{"type":"boolean","description":"Removes stop words from the search query.\n\nStop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own.\nIn English, \"the\", \"a\", or \"and\" are stop words.\n\nOnly use this feature for the languages used in your index.\n","default":false,"x-categories":["Languages"],"example":["ca","es"],"uniqueKey":"items.[INDEX].consequence.params.removeStopWords.oneOf.1","typeLabel":"boolean"}],"uniqueKey":"items.[INDEX].consequence.params.removeStopWords","typeLabel":"enum\u003cstring>[] | boolean"},"removeWordsIfNoResults":{"type":"string","enum":["none","lastWords","firstWords","allOptional"],"example":"firstWords","description":"Strategy for removing words from the query when it doesn't return any results.\nThis helps to avoid returning empty search results.\n\n- `none`.\n No words are removed when a query doesn't return results.\n\n- `lastWords`.\n Treat the last (then second to last, then third to last) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `firstWords`.\n Treat the first (then second, then third) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `allOptional`.\n Treat all words as optional.\n\nFor more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results).\n","default":"none","x-categories":["Query strategy"],"uniqueKey":"items.[INDEX].consequence.params.removeWordsIfNoResults","typeLabel":"enum\u003cstring>"},"renderingContent":{"description":"Extra data that can be used in the search UI.\n\nYou can use this to control aspects of your search UI, such as the order of facet names and values\nwithout changing your frontend code.\n","type":"object","additionalProperties":false,"properties":{"facetOrdering":{"description":"Order of facet names and facet values in your UI.","type":"object","additionalProperties":false,"properties":{"facets":{"description":"Order of facet names.","type":"object","additionalProperties":false,"properties":{"order":{"description":"Explicit order of facets or facet values.\n\nThis setting lets you always show specific facets or facet values at the top of the list.\n","type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.renderingContent.facetOrdering.facets.order.items.[INDEX]","typeLabel":"string"},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.facetOrdering.facets.order","typeLabel":"string[]"}},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.facetOrdering.facets","typeLabel":"object"},"values":{"description":"Order of facet values. One object for each facet.","type":"object","additionalProperties":{"type":"object","additionalProperties":false,"properties":{"hide":{"description":"Hide facet values.","type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.renderingContent.facetOrdering.values.additionalProperties.hide.items.[INDEX]","typeLabel":"string"},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.facetOrdering.values.additionalProperties.hide","typeLabel":"string[]"},"order":{"description":"Explicit order of facets or facet values.\n\nThis setting lets you always show specific facets or facet values at the top of the list.\n","type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.renderingContent.facetOrdering.values.additionalProperties.order.items.[INDEX]","typeLabel":"string"},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.facetOrdering.values.additionalProperties.order","typeLabel":"string[]"},"sortRemainingBy":{"description":"Order of facet values that aren't explicitly positioned with the `order` setting.\n\n- `count`.\n Order remaining facet values by decreasing count.\n The count is the number of matching records containing this facet value.\n\n- `alpha`.\n Sort facet values alphabetically.\n\n- `hidden`.\n Don't show facet values that aren't explicitly positioned.\n","type":"string","enum":["count","alpha","hidden"],"uniqueKey":"items.[INDEX].consequence.params.renderingContent.facetOrdering.values.additionalProperties.sortRemainingBy","typeLabel":"enum\u003cstring>"}},"x-additionalPropertiesName":"facet","uniqueKey":"items.[INDEX].consequence.params.renderingContent.facetOrdering.values.additionalProperties","typeLabel":"object"},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.facetOrdering.values","typeLabel":"object"}},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.facetOrdering","typeLabel":"object"},"redirect":{"description":"The redirect rule container.","type":"object","additionalProperties":false,"properties":{"url":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.renderingContent.redirect.url","typeLabel":"string"}},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.redirect","typeLabel":"object"},"widgets":{"description":"Widgets returned from any rules that are applied to the current search.","type":"object","additionalProperties":false,"properties":{"banners":{"description":"Banners defined in the Merchandising Studio for a given search.","type":"array","items":{"description":"Banner with image and link to redirect users.","type":"object","additionalProperties":false,"properties":{"image":{"description":"Image to show inside a banner.","type":"object","additionalProperties":false,"properties":{"title":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets.banners.items.[INDEX].image.title","typeLabel":"string"},"urls":{"type":"array","items":{"description":"URL for an image to show inside a banner.","type":"object","additionalProperties":false,"properties":{"url":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets.banners.items.[INDEX].image.urls.items.[INDEX].url","typeLabel":"string"}},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets.banners.items.[INDEX].image.urls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets.banners.items.[INDEX].image.urls","typeLabel":"object[]"}},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets.banners.items.[INDEX].image","typeLabel":"object"},"link":{"description":"Link for a banner defined in the Merchandising Studio.","type":"object","additionalProperties":false,"properties":{"url":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets.banners.items.[INDEX].link.url","typeLabel":"string"}},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets.banners.items.[INDEX].link","typeLabel":"object"}},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets.banners.items.[INDEX]","typeLabel":"object"},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets.banners","typeLabel":"object[]"},"resultCard":{"description":"Agent Studio Result Card to display for a given search.","type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether to show the Result Card for the current search.","uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets.resultCard.enabled","typeLabel":"boolean"}},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets.resultCard","typeLabel":"object"}},"uniqueKey":"items.[INDEX].consequence.params.renderingContent.widgets","typeLabel":"object"}},"x-categories":["Advanced"],"uniqueKey":"items.[INDEX].consequence.params.renderingContent","typeLabel":"object"},"replaceSynonymsInHighlight":{"type":"boolean","description":"Whether to replace a highlighted word with the matched synonym.\nBy default, the original words are highlighted even if a synonym matches.\nFor example, with `home` as a synonym for `house` and a search for `home`,\nrecords matching either \"home\" or \"house\" are included in the search results,\nand either \"home\" or \"house\" are highlighted\nWith `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records,\nbut all occurrences of \"house\" are replaced by \"home\" in the highlighted response.\n","default":false,"x-categories":["Highlighting and Snippeting"],"uniqueKey":"items.[INDEX].consequence.params.replaceSynonymsInHighlight","typeLabel":"boolean"},"reRankingApplyFilter":{"oneOf":[{"type":"array","items":{"oneOf":[{}],"uniqueKey":"items.[INDEX].consequence.params.reRankingApplyFilter.oneOf.0.items.[INDEX]","typeLabel":"any"},"description":"Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) to records that match these filters.\n","uniqueKey":"items.[INDEX].consequence.params.reRankingApplyFilter.oneOf.0","typeLabel":"any[]"},{"type":"string","description":"Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) to records that match these filters.\n","x-categories":["Filtering"],"uniqueKey":"items.[INDEX].consequence.params.reRankingApplyFilter.oneOf.1","typeLabel":"string"},{"type":"null","uniqueKey":"items.[INDEX].consequence.params.reRankingApplyFilter.oneOf.2","typeLabel":"null"}],"uniqueKey":"items.[INDEX].consequence.params.reRankingApplyFilter","typeLabel":"any[] | string | null"},"responseFields":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.responseFields.items.[INDEX]","typeLabel":"string"},"description":"Properties to include in the API response of search and browse requests.\nBy default, all response properties are included.\nTo reduce the response size, you can select which properties should be included\nAn empty list may lead to an empty API response (except properties you can't exclude)\nYou can't exclude these properties:\n`message`, `warning`, `cursor`, `abTestVariantID`,\nor any property added by setting `getRankingInfo` to true\nYour search depends on the `hits` field. If you omit this field, searches won't return any results.\nYour UI might also depend on other properties, for example, for pagination.\nBefore restricting the response size, check the impact on your search experience.\n","default":["*"],"x-categories":["Advanced"],"uniqueKey":"items.[INDEX].consequence.params.responseFields","typeLabel":"string[]"},"restrictHighlightAndSnippetArrays":{"type":"boolean","description":"Whether to restrict highlighting and snippeting to items that at least partially matched the search query.\nBy default, all items are highlighted and snippeted.\n","default":false,"x-categories":["Highlighting and Snippeting"],"uniqueKey":"items.[INDEX].consequence.params.restrictHighlightAndSnippetArrays","typeLabel":"boolean"},"restrictSearchableAttributes":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.restrictSearchableAttributes.items.[INDEX]","typeLabel":"string"},"example":["title","author"],"description":"Restricts a search to a subset of your searchable attributes.\nAttribute names are case-sensitive.\n","default":[],"x-categories":["Filtering"],"uniqueKey":"items.[INDEX].consequence.params.restrictSearchableAttributes","typeLabel":"string[]"},"ruleContexts":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.ruleContexts.items.[INDEX]","typeLabel":"string"},"description":"Assigns a rule context to the search query.\n[Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#assign-context) are strings that you can use to trigger matching rules.\n","default":[],"example":["mobile"],"x-categories":["Rules"],"uniqueKey":"items.[INDEX].consequence.params.ruleContexts","typeLabel":"string[]"},"semanticSearch":{"type":"object","description":"Settings for the semantic search part of NeuralSearch.\nOnly used when `mode` is `neuralSearch`.\n","properties":{"eventSources":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].consequence.params.semanticSearch.eventSources.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Indices from which to collect click and conversion events.\n\nIf null, the current index and all its replicas are used.\n","uniqueKey":"items.[INDEX].consequence.params.semanticSearch.eventSources.oneOf.0","typeLabel":"string[]"},{"type":"null","uniqueKey":"items.[INDEX].consequence.params.semanticSearch.eventSources.oneOf.1","typeLabel":"null"}],"uniqueKey":"items.[INDEX].consequence.params.semanticSearch.eventSources","typeLabel":"string[] | null"}},"uniqueKey":"items.[INDEX].consequence.params.semanticSearch","typeLabel":"object"},"similarQuery":{"type":"string","description":"Keywords to be used instead of the search query to conduct a more broader search.\nUsing the `similarQuery` parameter changes other settings\n- `queryType` is set to `prefixNone`.\n- `removeStopWords` is set to true.\n- `words` is set as the first ranking criterion.\n- All remaining words are treated as `optionalWords`.\nSince the `similarQuery` is supposed to do a broad search, they usually return many results.\nCombine it with `filters` to narrow down the list of results.\n","default":"","example":"comedy drama crime Macy Buscemi","x-categories":["Search"],"uniqueKey":"items.[INDEX].consequence.params.similarQuery","typeLabel":"string"},"snippetEllipsisText":{"type":"string","description":"String used as an ellipsis indicator when a snippet is truncated.","default":"…","x-categories":["Highlighting and Snippeting"],"uniqueKey":"items.[INDEX].consequence.params.snippetEllipsisText","typeLabel":"string"},"sortFacetValuesBy":{"type":"string","description":"Order in which to retrieve facet values.\n- `count`.\n Facet values are retrieved by decreasing count.\n The count is the number of matching records containing this facet value.\n- `alpha`.\n Retrieve facet values alphabetically.\nThis setting doesn't influence how facet values are displayed in your UI (see `renderingContent`).\nFor more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js).\n","default":"count","x-categories":["Faceting"],"uniqueKey":"items.[INDEX].consequence.params.sortFacetValuesBy","typeLabel":"string"},"sumOrFiltersScores":{"type":"boolean","description":"Whether to sum all filter scores.\nIf true, all filter scores are summed.\nOtherwise, the maximum filter score is kept.\nFor more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulate-scores-with-sumorfiltersscores).\n","default":false,"x-categories":["Filtering"],"uniqueKey":"items.[INDEX].consequence.params.sumOrFiltersScores","typeLabel":"boolean"},"synonyms":{"type":"boolean","description":"Whether to take into account an index's synonyms for this search.","default":true,"x-categories":["Advanced"],"uniqueKey":"items.[INDEX].consequence.params.synonyms","typeLabel":"boolean"},"tagFilters":{"oneOf":[{"type":"array","items":{"oneOf":[{}],"uniqueKey":"items.[INDEX].consequence.params.tagFilters.oneOf.0.items.[INDEX]","typeLabel":"any"},"description":"Filter the search by values of the special `_tags` attribute.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nDifferent from regular facets, `_tags` can only be used for filtering (including or excluding records).\nYou won't get a facet count.\nThe same combination and escaping rules apply as for `facetFilters`.\n","x-categories":["Filtering"],"example":[["Book","Movie"],"SciFi"],"uniqueKey":"items.[INDEX].consequence.params.tagFilters.oneOf.0","typeLabel":"any[]"},{"type":"string","description":"Filter the search by values of the special `_tags` attribute.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nDifferent from regular facets, `_tags` can only be used for filtering (including or excluding records).\nYou won't get a facet count.\nThe same combination and escaping rules apply as for `facetFilters`.\n","x-categories":["Filtering"],"example":[["Book","Movie"],"SciFi"],"uniqueKey":"items.[INDEX].consequence.params.tagFilters.oneOf.1","typeLabel":"string"}],"uniqueKey":"items.[INDEX].consequence.params.tagFilters","typeLabel":"any[] | string"},"typoTolerance":{"oneOf":[{"type":"boolean","description":"Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance) is enabled and how it is applied.\n\nIf typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation) are also active.\n","default":true,"x-categories":["Typos"],"uniqueKey":"items.[INDEX].consequence.params.typoTolerance.oneOf.0","typeLabel":"boolean"},{"type":"string","title":"typo tolerance","description":"Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance) is enabled and how it is applied.\n\nIf typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation) are also active.\n","enum":["min","strict","true","false"],"x-categories":["Typos"],"uniqueKey":"items.[INDEX].consequence.params.typoTolerance.oneOf.1","typeLabel":"enum\u003cstring>"}],"uniqueKey":"items.[INDEX].consequence.params.typoTolerance","typeLabel":"boolean | enum\u003cstring>"},"userToken":{"type":"string","description":"Unique pseudonymous or anonymous user identifier.\n\nThis helps with analytics and click and conversion events.\nFor more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).\n","example":"test-user-123","x-categories":["Personalization"],"uniqueKey":"items.[INDEX].consequence.params.userToken","typeLabel":"string"}},"additionalProperties":false,"description":"Parameters to apply to this search.\n\nYou can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`.\n","uniqueKey":"items.[INDEX].consequence.params","typeLabel":"object"},"promote":{"type":"array","maxItems":300,"description":"Records you want to pin to a specific position in the search results.\n\nYou can promote up to 300 records, either individually, or as groups of up to 100 records each.\n","items":{"oneOf":[{"type":"object","title":"objectIDs","description":"Records to promote.","required":["position","objectIDs"],"x-discriminator-fields":["objectIDs"],"properties":{"objectIDs":{"type":"array","maxItems":100,"description":"Object IDs of the records you want to promote.\n\nThe records are placed as a group at the `position`.\nFor example, if you want to promote four records to position `0`,\nthey will be the first four search results.\n","items":{"type":"string","description":"Unique record identifier.","example":"test-record-123","uniqueKey":"items.[INDEX].consequence.promote.items.[INDEX].oneOf.0.objectIDs.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"items.[INDEX].consequence.promote.items.[INDEX].oneOf.0.objectIDs","typeLabel":"string[]"},"position":{"type":"integer","description":"Position in the search results where you want to show the promoted records.","example":0,"isRequired":true,"uniqueKey":"items.[INDEX].consequence.promote.items.[INDEX].oneOf.0.position","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"items.[INDEX].consequence.promote.items.[INDEX].oneOf.0","typeLabel":"objectIDs · object"},{"type":"object","title":"objectID","description":"Record to promote.","required":["position","objectID"],"x-discriminator-fields":["objectID"],"properties":{"objectID":{"type":"string","description":"Unique record identifier.","example":"test-record-123","isRequired":true,"uniqueKey":"items.[INDEX].consequence.promote.items.[INDEX].oneOf.1.objectID","typeLabel":"string"},"position":{"type":"integer","description":"Position in the search results where you want to show the promoted records.","example":0,"isRequired":true,"uniqueKey":"items.[INDEX].consequence.promote.items.[INDEX].oneOf.1.position","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"items.[INDEX].consequence.promote.items.[INDEX].oneOf.1","typeLabel":"objectID · object"}],"uniqueKey":"items.[INDEX].consequence.promote.items.[INDEX]","typeLabel":"objectIDs · object | objectID · object"},"uniqueKey":"items.[INDEX].consequence.promote","typeLabel":"(objectIDs · object | objectID · object)[]"},"redirect":{"title":"consequenceRedirect","type":"object","description":"Redirect to a virtual replica index.\n\nThis consequence is only valid for rules with `scope: redirect`.\n","additionalProperties":false,"properties":{"indexName":{"type":"string","description":"Name of the virtual replica index to redirect searches to.","isRequired":true,"uniqueKey":"items.[INDEX].consequence.redirect.indexName","typeLabel":"string"}},"required":["indexName"],"uniqueKey":"items.[INDEX].consequence.redirect","typeLabel":"consequenceRedirect · object"},"userData":{"type":"object","description":"A JSON object with custom data that will be appended to the `userData` array in the response.\nThis object isn't interpreted by the API and is limited to 1\u0026nbsp;kB of minified JSON.\n","example":{"settingID":"f2a7b51e3503acc6a39b3784ffb84300","pluginVersion":"1.6.0"},"uniqueKey":"items.[INDEX].consequence.userData","typeLabel":"object"}},"isRequired":true,"uniqueKey":"items.[INDEX].consequence","typeLabel":"object"},"objectID":{"title":"objectID","type":"string","description":"Unique identifier of a rule object.","isRequired":true,"uniqueKey":"items.[INDEX].objectID","typeLabel":"string"},"condition":{"type":"object","additionalProperties":false,"properties":{"alternatives":{"type":"boolean","description":"Whether the pattern should match plurals, synonyms, and typos.","default":false,"uniqueKey":"items.[INDEX].condition.alternatives","typeLabel":"boolean"},"anchoring":{"type":"string","description":"Which part of the search query the pattern should match:\n\n- `startsWith`. The pattern must match the beginning of the query.\n- `endsWith`. The pattern must match the end of the query.\n- `is`. The pattern must match the query exactly.\n- `contains`. The pattern must match anywhere in the query.\n\nEmpty queries are only allowed as patterns with `anchoring: is`.\n","enum":["is","startsWith","endsWith","contains"],"uniqueKey":"items.[INDEX].condition.anchoring","typeLabel":"enum\u003cstring>"},"context":{"type":"string","pattern":"[A-Za-z0-9_-]+","description":"An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter.\nFor example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`.\nA rule context must only contain alphanumeric characters.\n","example":"mobile","uniqueKey":"items.[INDEX].condition.context","typeLabel":"string"},"filters":{"type":"string","description":"Filters that trigger the rule.\n\nYou can add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected.\nYou can use `filters` on its own or combine it with the `pattern` parameter.\nYou can't combine multiple filters with `OR` and you can't use numeric filters.\n","example":"genre:comedy","uniqueKey":"items.[INDEX].condition.filters","typeLabel":"string"},"pattern":{"type":"string","description":"Query pattern that triggers the rule.\n\nYou can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name.\nThe rule is triggered if the query matches the literal string or a value of the specified facet.\nFor example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\".\n","example":"{facet:genre}","uniqueKey":"items.[INDEX].condition.pattern","typeLabel":"string"}},"deprecated":true,"description":"Legacy field for a single condition. This field is maintained for backward compatibility \nwith older rules but should not be used in new implementations.\n","uniqueKey":"items.[INDEX].condition","typeLabel":"object"},"conditions":{"type":"array","minItems":0,"maxItems":25,"description":"Conditions that trigger a rule.\n\nSome consequences require specific conditions or don't require any condition.\nFor more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions).\n","items":{"type":"object","additionalProperties":false,"properties":{"alternatives":{"type":"boolean","description":"Whether the pattern should match plurals, synonyms, and typos.","default":false,"uniqueKey":"items.[INDEX].conditions.items.[INDEX].alternatives","typeLabel":"boolean"},"anchoring":{"type":"string","description":"Which part of the search query the pattern should match:\n\n- `startsWith`. The pattern must match the beginning of the query.\n- `endsWith`. The pattern must match the end of the query.\n- `is`. The pattern must match the query exactly.\n- `contains`. The pattern must match anywhere in the query.\n\nEmpty queries are only allowed as patterns with `anchoring: is`.\n","enum":["is","startsWith","endsWith","contains"],"uniqueKey":"items.[INDEX].conditions.items.[INDEX].anchoring","typeLabel":"enum\u003cstring>"},"context":{"type":"string","pattern":"[A-Za-z0-9_-]+","description":"An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter.\nFor example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`.\nA rule context must only contain alphanumeric characters.\n","example":"mobile","uniqueKey":"items.[INDEX].conditions.items.[INDEX].context","typeLabel":"string"},"filters":{"type":"string","description":"Filters that trigger the rule.\n\nYou can add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected.\nYou can use `filters` on its own or combine it with the `pattern` parameter.\nYou can't combine multiple filters with `OR` and you can't use numeric filters.\n","example":"genre:comedy","uniqueKey":"items.[INDEX].conditions.items.[INDEX].filters","typeLabel":"string"},"pattern":{"type":"string","description":"Query pattern that triggers the rule.\n\nYou can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name.\nThe rule is triggered if the query matches the literal string or a value of the specified facet.\nFor example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\".\n","example":"{facet:genre}","uniqueKey":"items.[INDEX].conditions.items.[INDEX].pattern","typeLabel":"string"}},"uniqueKey":"items.[INDEX].conditions.items.[INDEX]","typeLabel":"object"},"uniqueKey":"items.[INDEX].conditions","typeLabel":"object[]"},"description":{"type":"string","description":"Description of the rule's purpose to help you distinguish between different rules.","example":"Display a promotional banner","uniqueKey":"items.[INDEX].description","typeLabel":"string"},"enabled":{"type":"boolean","default":true,"description":"Whether the rule is active.","uniqueKey":"items.[INDEX].enabled","typeLabel":"boolean"},"scope":{"type":"string","uniqueKey":"items.[INDEX].scope","typeLabel":"string"},"tags":{"type":"array","items":{"type":"string","uniqueKey":"items.[INDEX].tags.items.[INDEX]","typeLabel":"string"},"uniqueKey":"items.[INDEX].tags","typeLabel":"string[]"},"validity":{"type":"array","description":"Time periods when the rule is active.","items":{"type":"object","additionalProperties":false,"properties":{"from":{"type":"integer","format":"int64","description":"Timestamp when the rule should start to be active, measured in seconds since the Unix epoch.","uniqueKey":"items.[INDEX].validity.items.[INDEX].from","typeLabel":"integer\u003cint64>"},"until":{"type":"integer","format":"int64","description":"Timestamp when the rule should stop to be active, measured in seconds since the Unix epoch.","uniqueKey":"items.[INDEX].validity.items.[INDEX].until","typeLabel":"integer\u003cint64>"}},"uniqueKey":"items.[INDEX].validity.items.[INDEX]","typeLabel":"object"},"uniqueKey":"items.[INDEX].validity","typeLabel":"object[]"}},"required":["objectID","consequence"],"uniqueKey":"items.[INDEX]","typeLabel":"object"},"uniqueKey":"","typeLabel":"object[]"},"examples":{"Example":{"title":"Example","value":[{"consequence":{"filterPromotes":false,"hide":[{"objectID":"test-record-123"}],"params":{"advancedSyntax":false,"advancedSyntaxFeatures":["exactPhrase","excludeWords"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["ignorePlurals","singleWordSynonym"],"analytics":true,"analyticsTags":[],"aroundLatLng":"40.71,-74.01","aroundLatLngViaIP":false,"aroundPrecision":10,"aroundRadius":2,"attributeCriteriaComputedBy":"best","attributeCriteriaComputedByMinProximity":false,"attributesToHighlight":["author","title","conten","content"],"attributesToRetrieve":["author","title","content"],"attributesToSnippet":["content:80","description"],"automaticFacetFilters":[{"facet":"\u003cstring>","disjunctive":false,"score":1}],"automaticOptionalFacetFilters":[{"facet":"\u003cstring>","disjunctive":false,"score":1}],"clickAnalytics":false,"decompoundQuery":true,"disableExactOnAttributes":["description"],"disableTypoToleranceOnAttributes":["sku"],"distinct":1,"enableABTest":true,"enablePersonalization":false,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[["category:Book","category:-Movie"],"author:John Doe"],"facetingAfterDistinct":false,"facets":["*"],"filters":"(category:Book OR category:Ebook) AND _tags:published","getRankingInfo":false,"highlightPostTag":"\u003c/em>","highlightPreTag":"\u003cem>","hitsPerPage":20,"ignorePlurals":["ca","es"],"insideBoundingBox":"\u003cstring>","insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"length":500,"maxValuesPerFacet":100,"minimumAroundRadius":2,"minProximity":1,"minWordSizefor1Typo":4,"minWordSizefor2Typos":8,"mode":"keywordSearch","naturalLanguages":[],"numericFilters":[["inStock = 1","deliveryDate \u003c 1441755506"],"price \u003c 1000"],"offset":123,"optionalFilters":["category:Book","author:John Doe"],"optionalWords":"\u003cstring>","page":0,"percentileComputation":true,"personalizationImpact":100,"query":{"edits":[{"delete":"\u003cstring>","insert":"\u003cstring>"}],"remove":["\u003cstring>"]},"queryLanguages":["es"],"queryType":"prefixLast","ranking":["typo","geo","words","filters","proximity","attribute","exact","custom"],"relevancyStrictness":90,"removeStopWords":["ca","es"],"removeWordsIfNoResults":"firstWords","renderingContent":{"facetOrdering":{"facets":{"order":["\u003cstring>"]},"values":{}},"redirect":{"url":"\u003cstring>"},"widgets":{"banners":[{"image":{"title":"\u003cstring>","urls":[{"url":"\u003cstring>"}]},"link":{"url":"\u003cstring>"}}],"resultCard":{"enabled":true}}},"replaceSynonymsInHighlight":false,"reRankingApplyFilter":["\u003cunknown>"],"responseFields":["*"],"restrictHighlightAndSnippetArrays":false,"restrictSearchableAttributes":["title","author"],"ruleContexts":["mobile"],"semanticSearch":{"eventSources":["\u003cstring>"]},"similarQuery":"comedy drama crime Macy Buscemi","snippetEllipsisText":"…","sortFacetValuesBy":"count","sumOrFiltersScores":false,"synonyms":true,"tagFilters":[["Book","Movie"],"SciFi"],"typoTolerance":true,"userToken":"test-user-123"},"promote":[{"objectIDs":["test-record-123"],"position":0}],"userData":{"settingID":"f2a7b51e3503acc6a39b3784ffb84300","pluginVersion":"1.6.0"}},"objectID":"\u003cstring>","condition":{"alternatives":false,"context":"mobile","filters":"genre:comedy","pattern":"{facet:genre}"},"conditions":[{"alternatives":false,"context":"mobile","filters":"genre:comedy","pattern":"{facet:genre}"}],"description":"Display a promotional banner","enabled":true,"scope":"\u003cstring>","tags":["\u003cstring>"],"validity":[{"from":123,"until":123}]}]}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"bc59135b-3333-4f80-8e3d-f3f15fa2a536":{"description":"OK","headers":{"Correlation-ID":{"description":"Identifies the request in Algolia's logs, where it's the `cid` property of a log entry.\nInclude it when you contact the Algolia support team about a specific request.\nRetried requests can share an identifier, so don't use it as a unique key.\n","example":"MyAppl-1tMcE-a7BqLm2Pd0Z","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","description":"Response, taskID, and update timestamp.","additionalProperties":false,"required":["taskID","updatedAt"],"properties":{"taskID":{"type":"integer","format":"int64","example":1514562690001,"description":"Unique identifier of a task.\n\nA successful API response means that a task was added to a queue.\nIt might not run immediately.\nYou can check the task's progress with the [`task` operation](https://www.algolia.com/doc/rest-api/search/get-task) and this task ID.\n","isRequired":true,"uniqueKey":"taskID","typeLabel":"integer\u003cint64>"},"updatedAt":{"type":"string","example":"2023-07-04T12:49:15Z","description":"Date and time when the object was updated, in RFC 3339 format.","isRequired":true,"uniqueKey":"updatedAt","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"taskID":1514562690001,"updatedAt":"2023-07-04T12:49:15Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"9aea4856-0d55-4fcd-8774-2d441cdb601c":{"description":"Bad request or request arguments.","content":{"application/json":{"schema":{"description":"Error.","type":"object","x-keep-model":true,"additionalProperties":true,"properties":{"message":{"type":"string","example":"Invalid Application-Id or API-Key","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Invalid Application-Id or API-Key"}}},"exampleType":"generated"}},"exampleType":"generated"},"0e61efa4-63d8-4793-afa9-e4484e299a9e":{"description":"This feature is not enabled on your Algolia account.","content":{"application/json":{"schema":{"description":"Error.","type":"object","x-keep-model":true,"additionalProperties":true,"properties":{"message":{"type":"string","example":"Invalid Application-Id or API-Key","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Invalid Application-Id or API-Key"}}},"exampleType":"generated"}},"exampleType":"generated"},"219f2dbd-26e4-4f53-86c9-6f9f209edab5":{"description":"Method not allowed with this API key.","content":{"application/json":{"schema":{"description":"Error.","type":"object","x-keep-model":true,"additionalProperties":true,"properties":{"message":{"type":"string","example":"Invalid Application-Id or API-Key","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Invalid Application-Id or API-Key"}}},"exampleType":"generated"}},"exampleType":"generated"},"2e1704ef-4bb2-4e27-ba5f-72cc553bbd34":{"description":"Index not found.","content":{"application/json":{"schema":{"description":"Error.","type":"object","x-keep-model":true,"additionalProperties":true,"properties":{"message":{"type":"string","example":"Invalid Application-Id or API-Key","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Invalid Application-Id or API-Key"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"6778c432-073c-4e26-8fa5-302c60cfbd65":{"appId":{"type":"apiKey","in":"header","name":"x-algolia-application-id","description":"Your Algolia application ID.","scopes":[],"schemeName":"appId"},"apiKey":{"type":"apiKey","in":"header","name":"x-algolia-api-key","description":"Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n","scopes":[],"schemeName":"apiKey"}}},"servers":{"0aad5a48-7de4-4524-b934-2ac2ba432076":{"url":"https://{appId}.algolia.net","variables":{"appId":{"default":"ALGOLIA_APPLICATION_ID"}}},"ba3c5d9d-cbe0-4b42-b8c7-c60e8ef39300":{"url":"https://{appId}-1.algolianet.com","variables":{"appId":{"default":"ALGOLIA_APPLICATION_ID"}}},"caaeb03e-4370-4636-8188-617507a40b94":{"url":"https://{appId}-2.algolianet.com","variables":{"appId":{"default":"ALGOLIA_APPLICATION_ID"}}},"c3a3843e-e2b9-408c-913e-aa7408c6ed9e":{"url":"https://{appId}-3.algolianet.com","variables":{"appId":{"default":"ALGOLIA_APPLICATION_ID"}}},"40e97917-1a69-4582-958a-876359d478c0":{"url":"https://{appId}-dsn.algolia.net","variables":{"appId":{"default":"ALGOLIA_APPLICATION_ID"}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-algolia-application-id","description":"Your Algolia application ID.","scopes":[],"schemeName":"appId"},"schema":{"title":"x-algolia-application-id","type":"string","description":"Your Algolia application ID.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"appId","name":"x-algolia-application-id"},{"scheme":{"type":"apiKey","in":"header","name":"x-algolia-api-key","description":"Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n","scopes":[],"schemeName":"apiKey"},"schema":{"title":"x-algolia-api-key","type":"string","description":"Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKey","name":"x-algolia-api-key"}],"title":"appId \u0026 apiKey"}]},"originalFileLocation":"specs/search.yml"},"subdomain":"algolia","siteName":"Algolia","title":"Create or update rules - Algolia","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-23T09:45:05.637Z","gitLastModified":"2026-03-23T09:42:41.000Z","originalFileLocation":"doc/rest-api/search/save-rules.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create or update multiple rules.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Algolia\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create or update rules - Algolia\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create or update multiple rules.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Algolia\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.algolia.com/doc/rest-api/search/save-rules\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://algolia.mintlify.site/_mintlify/api/og/v2?division=Rules\u0026amp;title=Create+or+update+rules\u0026amp;description=Create+or+update+multiple+rules.\u0026amp;theme=7b696fa6ef3d890ba8a17746\u0026amp;signature=a5c76f579ed2b2e7dece1728dc4d5e98986aeb4f923682698837a52ab64b6dd1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create or update rules - Algolia\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create or update multiple rules.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://algolia.mintlify.site/_mintlify/api/og/v2?division=Rules\u0026amp;title=Create+or+update+rules\u0026amp;description=Create+or+update+multiple+rules.\u0026amp;theme=7b696fa6ef3d890ba8a17746\u0026amp;signature=a5c76f579ed2b2e7dece1728dc4d5e98986aeb4f923682698837a52ab64b6dd1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Algolia\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3970ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.algolia.com/doc/rest-api/search/save-rules\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/doc/rest-api/search/save-rules.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.algolia.com/#organization\",\"name\":\"Algolia\",\"url\":\"https://www.algolia.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/algolia/kiecJp3hu-WXhj-3/logo/light.svg?fit=max\u0026auto=format\u0026n=kiecJp3hu-WXhj-3\u0026q=85\u0026s=bf613e260ca94c0eb23384e6c0d5c77f\"},\"sameAs\":[\"https://www.linkedin.com/company/algolia/\",\"https://github.com/algolia\",\"https://x.com/algolia\",\"https://www.youtube.com/channel/UCTNkiq-SO8hay1PRx-it9Cw\"]},{\"@type\":\"WebSite\",\"@id\":\"https://www.algolia.com#website\",\"name\":\"Algolia\",\"url\":\"https://www.algolia.com\",\"publisher\":{\"@id\":\"https://www.algolia.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.algolia.com/doc/rest-api/search/save-rules#webpage\",\"url\":\"https://www.algolia.com/doc/rest-api/search/save-rules\",\"name\":\"Create or update rules\",\"description\":\"Create or update multiple rules.\",\"dateModified\":\"2026-03-23T09:42:41.000Z\",\"isPartOf\":{\"@id\":\"https://www.algolia.com#website\"},\"breadcrumb\":{\"@id\":\"https://www.algolia.com/doc/rest-api/search/save-rules#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.algolia.com/doc/rest-api/search/save-rules#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Search API endpoints\",\"item\":\"https://www.algolia.com/doc/rest-api/search\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rules\",\"item\":\"https://www.algolia.com/doc/rest-api/search/get-rule\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create or update rules\",\"item\":\"https://www.algolia.com/doc/rest-api/search/save-rules\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://www.algolia.com/doc/rest-api/search/save-rules#apireference\",\"headline\":\"Create or update rules\",\"name\":\"Create or update rules\",\"description\":\"Create or update multiple rules.\",\"url\":\"https://www.algolia.com/doc/rest-api/search/save-rules\",\"mainEntityOfPage\":{\"@id\":\"https://www.algolia.com/doc/rest-api/search/save-rules#webpage\"},\"dateModified\":\"2026-03-23T09:42:41.000Z\",\"publisher\":{\"@id\":\"https://www.algolia.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.algolia.com#website\"}}]}\u003c/script>","agentPointerHref":"/doc/rest-api/search/save-rules.md","siteName":"Algolia","nav":{"global":null,"tabs":[{"tab":"Guides","icon":"book-text","pages":[{"title":"Guides","href":"/doc/guides/get-started"}]},{"tab":"Libraries and tools","icon":"wrench","menu":[{"item":"API clients","versions":[{"version":"current","groups":[{"group":"current","pages":[{"title":"current","href":"/doc/libraries/sdk"}]}]},{"version":"legacy","groups":[{"group":"legacy","pages":[{"title":"legacy","href":"/doc/libraries/sdk/v1/install"}]}]}]},{"item":"Algolia CLI","pages":[{"title":"Algolia CLI","href":"/doc/tools/cli/get-started"}]},{"item":"Algolia Wizard","pages":[{"title":"Algolia Wizard","href":"/doc/tools/algolia-wizard"}]},{"item":"Crawler","pages":[{"title":"Crawler","href":"/doc/tools/crawler/getting-started/overview"}]},{"item":"Django","pages":[{"title":"Django","href":"/doc/framework-integration/django/setup"}]},{"item":"Laravel","pages":[{"title":"Laravel","href":"/doc/framework-integration/laravel/getting-started/introduction-to-scout-extended"}]},{"item":"Ruby on Rails","pages":[{"title":"Ruby on Rails","href":"/doc/framework-integration/rails/getting-started/setup"}]},{"item":"Symfony","pages":[{"title":"Symfony","href":"/doc/framework-integration/symfony/getting-started/algolia-searchbundle"}]},{"item":"All libraries and tools","pages":[{"title":"All libraries and tools","href":"/doc/libraries"}]}],"pages":[{"title":"Libraries and tools","href":"/doc/libraries/sdk"}]},{"tab":"UI libraries","icon":"proportions","menu":[{"item":"InstantSearch.js","pages":[{"title":"InstantSearch.js","href":"/doc/api-reference/widgets/js"}]},{"item":"React InstantSearch","pages":[{"title":"React InstantSearch","href":"/doc/api-reference/widgets/react"}]},{"item":"Vue InstantSearch","pages":[{"title":"Vue InstantSearch","href":"/doc/api-reference/widgets/vue"}]},{"item":"InstantSearch iOS","pages":[{"title":"InstantSearch iOS","href":"/doc/api-reference/widgets/ios"}]},{"item":"InstantSearch Android","pages":[{"title":"InstantSearch Android","href":"/doc/api-reference/widgets/android"}]},{"item":"Algolia for Flutter","pages":[{"title":"Algolia for Flutter","href":"/doc/api-reference/widgets/flutter"}]},{"item":"Autocomplete","pages":[{"title":"Autocomplete","href":"/doc/ui-libraries/autocomplete/introduction/what-is-autocomplete"}]},{"item":"All UI libraries","pages":[{"title":"All UI libraries","href":"/doc/ui-libraries"}]}],"pages":[{"title":"UI libraries","href":"/doc/api-reference/widgets/js"}]},{"tab":"Integrations","icon":"plug","menu":[{"item":"Adobe Commerce/Magento","pages":[{"title":"Adobe Commerce/Magento","href":"/doc/integration/magento-2/getting-started/quick-start"}]},{"item":"BigCommerce","pages":[{"title":"BigCommerce","href":"/doc/integration/bigcommerce/get-started/installation"}]},{"item":"commercetools","pages":[{"title":"commercetools","href":"/doc/integration/commercetools/get-started/installation"}]},{"item":"Make","pages":[{"title":"Make","href":"/doc/integration/make"}]},{"item":"n8n","pages":[{"title":"n8n","href":"/doc/integration/n8n"}]},{"item":"Salesforce B2C Commerce","pages":[{"title":"Salesforce B2C Commerce","href":"/doc/integration/salesforce-commerce-cloud-b2c/getting-started/introduction"}]},{"item":"Shopify","pages":[{"title":"Shopify","href":"/doc/integration/shopify/getting-started/quick-start"}]},{"item":"Stripe Projects","pages":[{"title":"Stripe Projects","href":"/doc/integration/stripe-projects"}]},{"item":"Zapier","pages":[{"title":"Zapier","href":"/doc/integration/zapier"}]},{"item":"Zendesk","pages":[{"title":"Zendesk","href":"/doc/integration/zendesk/get-started"}]},{"item":"Vercel","pages":[{"title":"Vercel","href":"/doc/integration/vercel"}]},{"item":"All integrations","pages":[{"title":"All integrations","href":"/doc/integration"}]}],"pages":[{"title":"Integrations","href":"/doc/integration/magento-2/getting-started/quick-start"}]},{"tab":"API reference","icon":"code","menu":[{"item":"Search","groups":[{"group":"Search API endpoints","icon":"code","pages":[{"title":"Search API","sidebarTitle":"Overview","href":"/doc/rest-api/search"},{"group":"Search","pages":[{"title":"Search an index","openapi":"specs/search.yml post /1/indexes/{indexName}/query","href":"/doc/rest-api/search/search-single-index"},{"title":"Search multiple queries","openapi":"specs/search.yml post /1/indexes/*/queries","href":"/doc/rest-api/search/search"},{"title":"Search for facet values","openapi":"specs/search.yml post /1/indexes/{indexName}/facets/{facetName}/query","href":"/doc/rest-api/search/search-for-facet-values"},{"title":"Browse for records","openapi":"specs/search.yml post /1/indexes/{indexName}/browse","href":"/doc/rest-api/search/browse"}]},{"group":"Records","pages":[{"title":"Add or replace a record","openapi":"specs/search.yml put /1/indexes/{indexName}/{objectID}","href":"/doc/rest-api/search/add-or-update-object"},{"title":"Batch indexing operations on one index","openapi":"specs/search.yml post /1/indexes/{indexName}/batch","href":"/doc/rest-api/search/batch"},{"title":"Delete all records from an index","openapi":"specs/search.yml post /1/indexes/{indexName}/clear","href":"/doc/rest-api/search/clear-objects"},{"title":"Delete records matching a filter","openapi":"specs/search.yml post /1/indexes/{indexName}/deleteByQuery","href":"/doc/rest-api/search/delete-by"},{"title":"Delete a record","openapi":"specs/search.yml delete /1/indexes/{indexName}/{objectID}","href":"/doc/rest-api/search/delete-object"},{"title":"Retrieve a record","openapi":"specs/search.yml get /1/indexes/{indexName}/{objectID}","href":"/doc/rest-api/search/get-object"},{"title":"Retrieve records","openapi":"specs/search.yml post /1/indexes/*/objects","href":"/doc/rest-api/search/get-objects"},{"title":"Batch indexing operations on multiple indices","openapi":"specs/search.yml post /1/indexes/*/batch","href":"/doc/rest-api/search/multiple-batch"},{"title":"Add or update attributes","openapi":"specs/search.yml post /1/indexes/{indexName}/{objectID}/partial","href":"/doc/rest-api/search/partial-update-object"},{"title":"Add a new record (with auto-generated object ID)","openapi":"specs/search.yml post /1/indexes/{indexName}","href":"/doc/rest-api/search/save-object"}]},{"group":"Indices","pages":[{"title":"Delete an index","openapi":"specs/search.yml delete /1/indexes/{indexName}","href":"/doc/rest-api/search/delete-index"},{"title":"Retrieve index settings","openapi":"specs/search.yml get /1/indexes/{indexName}/settings","href":"/doc/rest-api/search/get-settings"},{"title":"Check task status","openapi":"specs/search.yml get /1/indexes/{indexName}/task/{taskID}","href":"/doc/rest-api/search/get-task"},{"title":"List indices","openapi":"specs/search.yml get /1/indexes","href":"/doc/rest-api/search/list-indices"},{"title":"Copy or move an index","openapi":"specs/search.yml post /1/indexes/{indexName}/operation","href":"/doc/rest-api/search/operation-index"},{"title":"Update index settings","openapi":"specs/search.yml put /1/indexes/{indexName}/settings","href":"/doc/rest-api/search/set-settings"}]},{"group":"Rules","pages":[{"title":"Retrieve a rule","openapi":"specs/search.yml get /1/indexes/{indexName}/rules/{objectID}","href":"/doc/rest-api/search/get-rule"},{"title":"Create or replace a rule","openapi":"specs/search.yml put /1/indexes/{indexName}/rules/{objectID}","href":"/doc/rest-api/search/save-rule"},{"title":"Delete a rule","description":"Deletes a rule by its ID.","openapi":"specs/search.yml delete /1/indexes/{indexName}/rules/{objectID}","href":"/doc/rest-api/search/delete-rule"},{"title":"Create or update rules","openapi":"specs/search.yml post /1/indexes/{indexName}/rules/batch","href":"/doc/rest-api/search/save-rules"},{"title":"Delete all rules","description":"Deletes all rules from the index.","openapi":"specs/search.yml post /1/indexes/{indexName}/rules/clear","href":"/doc/rest-api/search/clear-rules"},{"title":"Search for rules","openapi":"specs/search.yml post /1/indexes/{indexName}/rules/search","href":"/doc/rest-api/search/search-rules"}]},{"group":"Synonyms","pages":[{"title":"Retrieve a synonym","openapi":"specs/search.yml get /1/indexes/{indexName}/synonyms/{objectID}","href":"/doc/rest-api/search/get-synonym"},{"title":"Create or replace a synonym","openapi":"specs/search.yml put /1/indexes/{indexName}/synonyms/{objectID}","href":"/doc/rest-api/search/save-synonym"},{"title":"Delete a synonym","openapi":"specs/search.yml delete /1/indexes/{indexName}/synonyms/{objectID}","href":"/doc/rest-api/search/delete-synonym"},{"title":"Create or replace synonyms","openapi":"specs/search.yml post /1/indexes/{indexName}/synonyms/batch","href":"/doc/rest-api/search/save-synonyms"},{"title":"Delete all synonyms","openapi":"specs/search.yml post /1/indexes/{indexName}/synonyms/clear","href":"/doc/rest-api/search/clear-synonyms"},{"title":"Search for synonyms","openapi":"specs/search.yml post /1/indexes/{indexName}/synonyms/search","href":"/doc/rest-api/search/search-synonyms"}]},{"group":"Dictionaries","pages":[{"title":"Add or delete dictionary entries","openapi":"specs/search.yml post /1/dictionaries/{dictionaryName}/batch","href":"/doc/rest-api/search/batch-dictionary-entries"},{"title":"Search dictionary entries","openapi":"specs/search.yml post /1/dictionaries/{dictionaryName}/search","href":"/doc/rest-api/search/search-dictionary-entries"},{"title":"Retrieve dictionary settings","openapi":"specs/search.yml get /1/dictionaries/*/settings","href":"/doc/rest-api/search/get-dictionary-settings"},{"title":"Update dictionary settings","openapi":"specs/search.yml put /1/dictionaries/*/settings","href":"/doc/rest-api/search/set-dictionary-settings"},{"title":"List available languages","openapi":"specs/search.yml get /1/dictionaries/*/languages","href":"/doc/rest-api/search/get-dictionary-languages"}]},{"group":"API keys","pages":[{"title":"List API keys","openapi":"specs/search.yml get /1/keys","href":"/doc/rest-api/search/list-api-keys"},{"title":"Create an API key","openapi":"specs/search.yml post /1/keys","href":"/doc/rest-api/search/add-api-key"},{"title":"Retrieve API key permissions","openapi":"specs/search.yml get /1/keys/{key}","href":"/doc/rest-api/search/get-api-key"},{"title":"Update an API key","openapi":"specs/search.yml put /1/keys/{key}","href":"/doc/rest-api/search/update-api-key"},{"title":"Delete an API key","openapi":"specs/search.yml delete /1/keys/{key}","href":"/doc/rest-api/search/delete-api-key"},{"title":"Restore an API key","openapi":"specs/search.yml post /1/keys/{key}/restore","href":"/doc/rest-api/search/restore-api-key"}]},{"group":"Vaults","pages":[{"title":"List allowed sources","openapi":"specs/search.yml get /1/security/sources","href":"/doc/rest-api/search/get-sources"},{"title":"Replace allowed sources","openapi":"specs/search.yml put /1/security/sources","href":"/doc/rest-api/search/replace-sources"},{"title":"Add a source","openapi":"specs/search.yml post /1/security/sources/append","href":"/doc/rest-api/search/append-source"},{"title":"Delete a source","openapi":"specs/search.yml delete /1/security/sources/{source}","href":"/doc/rest-api/search/delete-source"}]},{"group":"Other","pages":[{"title":"Retrieve log entries","openapi":"specs/search.yml get /1/logs","href":"/doc/rest-api/search/get-logs"},{"title":"Check application task status","openapi":"specs/search.yml get /1/task/{taskID}","href":"/doc/rest-api/search/get-app-task"}]},{"group":"Clusters (deprecated)","pages":[{"title":"Assign or move a user ID","openapi":"specs/search.yml post /1/clusters/mapping","href":"/doc/rest-api/search/assign-user-id"},{"title":"Assign multiple userIDs","openapi":"specs/search.yml post /1/clusters/mapping/batch","href":"/doc/rest-api/search/batch-assign-user-ids"},{"title":"Get top user IDs","openapi":"specs/search.yml get /1/clusters/mapping/top","href":"/doc/rest-api/search/get-top-user-ids"},{"title":"Retrieve user ID","openapi":"specs/search.yml get /1/clusters/mapping/{userID}","href":"/doc/rest-api/search/get-user-id"},{"title":"Get migration and user mapping status","openapi":"specs/search.yml get /1/clusters/mapping/pending","href":"/doc/rest-api/search/has-pending-mappings"},{"title":"List clusters","openapi":"specs/search.yml get /1/clusters","href":"/doc/rest-api/search/list-clusters"},{"title":"List user IDs","openapi":"specs/search.yml get /1/clusters/mapping","href":"/doc/rest-api/search/list-user-ids"},{"title":"Delete user ID","openapi":"specs/search.yml delete /1/clusters/mapping/{userID}","href":"/doc/rest-api/search/remove-user-id"},{"title":"Search for user IDs","openapi":"specs/search.yml post /1/clusters/mapping/search","href":"/doc/rest-api/search/search-user-ids"}]}]},{"group":"Index settings/API parameters","icon":"cog","pages":[{"group":"Overview","root":{"title":"Index settings and Search API parameters","sidebarTitle":"API parameters","href":"/doc/api-reference/api-parameters"},"pages":[{"title":"Index settings","href":"/doc/api-reference/settings-api-parameters"},{"title":"Search API Parameters","href":"/doc/api-reference/search-api-parameters"}]},{"group":"Search","pages":[{"title":"query","href":"/doc/api-reference/api-parameters/query"},{"title":"similarQuery","href":"/doc/api-reference/api-parameters/similarQuery"}]},{"group":"Attributes","pages":[{"title":"attributesForFaceting","href":"/doc/api-reference/api-parameters/attributesForFaceting"},{"title":"attributesToRetrieve","href":"/doc/api-reference/api-parameters/attributesToRetrieve"},{"title":"restrictSearchableAttributes","href":"/doc/api-reference/api-parameters/restrictSearchableAttributes"},{"title":"searchableAttributes","href":"/doc/api-reference/api-parameters/searchableAttributes"},{"title":"unretrievableAttributes","href":"/doc/api-reference/api-parameters/unretrievableAttributes"}]},{"group":"Ranking","pages":[{"title":"customRanking","href":"/doc/api-reference/api-parameters/customRanking"},{"title":"mode","href":"/doc/api-reference/api-parameters/mode"},{"title":"ranking","href":"/doc/api-reference/api-parameters/ranking"},{"title":"relevancyStrictness","href":"/doc/api-reference/api-parameters/relevancyStrictness"},{"title":"replicas","href":"/doc/api-reference/api-parameters/replicas"}]},{"group":"Filtering","pages":[{"title":"facetFilters","href":"/doc/api-reference/api-parameters/facetFilters"},{"title":"filters","href":"/doc/api-reference/api-parameters/filters"},{"title":"numericFilters","href":"/doc/api-reference/api-parameters/numericFilters"},{"title":"optionalFilters","href":"/doc/api-reference/api-parameters/optionalFilters"},{"title":"sumOrFiltersScores","href":"/doc/api-reference/api-parameters/sumOrFiltersScores"},{"title":"tagFilters","href":"/doc/api-reference/api-parameters/tagFilters"}]},{"group":"Faceting","pages":[{"title":"facetingAfterDistinct","href":"/doc/api-reference/api-parameters/facetingAfterDistinct"},{"title":"facets","href":"/doc/api-reference/api-parameters/facets"},{"title":"maxFacetHits","href":"/doc/api-reference/api-parameters/maxFacetHits"},{"title":"maxValuesPerFacet","href":"/doc/api-reference/api-parameters/maxValuesPerFacet"},{"title":"sortFacetValuesBy","href":"/doc/api-reference/api-parameters/sortFacetValuesBy"}]},{"group":"Highlighting/Snippeting","pages":[{"title":"attributesToHighlight","href":"/doc/api-reference/api-parameters/attributesToHighlight"},{"title":"attributesToSnippet","href":"/doc/api-reference/api-parameters/attributesToSnippet"},{"title":"highlightPostTag","href":"/doc/api-reference/api-parameters/highlightPostTag"},{"title":"highlightPreTag","href":"/doc/api-reference/api-parameters/highlightPreTag"},{"title":"restrictHighlightAndSnippetArrays","href":"/doc/api-reference/api-parameters/restrictHighlightAndSnippetArrays"},{"title":"snippetEllipsisText","href":"/doc/api-reference/api-parameters/snippetEllipsisText"}]},{"group":"Pagination","pages":[{"title":"hitsPerPage","href":"/doc/api-reference/api-parameters/hitsPerPage"},{"title":"length","href":"/doc/api-reference/api-parameters/length"},{"title":"offset","href":"/doc/api-reference/api-parameters/offset"},{"title":"page","href":"/doc/api-reference/api-parameters/page"},{"title":"paginationLimitedTo","href":"/doc/api-reference/api-parameters/paginationLimitedTo"}]},{"group":"Typos","pages":[{"title":"allowTyposOnNumericTokens","href":"/doc/api-reference/api-parameters/allowTyposOnNumericTokens"},{"title":"disableTypoToleranceOnAttributes","href":"/doc/api-reference/api-parameters/disableTypoToleranceOnAttributes"},{"title":"disableTypoToleranceOnWords","href":"/doc/api-reference/api-parameters/disableTypoToleranceOnWords"},{"title":"minWordSizefor1Typo","href":"/doc/api-reference/api-parameters/minWordSizefor1Typo"},{"title":"minWordSizefor2Typos","href":"/doc/api-reference/api-parameters/minWordSizefor2Typos"},{"title":"separatorsToIndex","href":"/doc/api-reference/api-parameters/separatorsToIndex"},{"title":"typoTolerance","href":"/doc/api-reference/api-parameters/typoTolerance"}]},{"group":"Geo Search","pages":[{"title":"aroundLatLng","href":"/doc/api-reference/api-parameters/aroundLatLng"},{"title":"aroundLatLngViaIP","href":"/doc/api-reference/api-parameters/aroundLatLngViaIP"},{"title":"aroundPrecision","href":"/doc/api-reference/api-parameters/aroundPrecision"},{"title":"aroundRadius","href":"/doc/api-reference/api-parameters/aroundRadius"},{"title":"insideBoundingBox","href":"/doc/api-reference/api-parameters/insideBoundingBox"},{"title":"insidePolygon","href":"/doc/api-reference/api-parameters/insidePolygon"},{"title":"minimumAroundRadius","href":"/doc/api-reference/api-parameters/minimumAroundRadius"}]},{"group":"Languages","pages":[{"title":"attributesToTransliterate","href":"/doc/api-reference/api-parameters/attributesToTransliterate"},{"title":"camelCaseAttributes","href":"/doc/api-reference/api-parameters/camelCaseAttributes"},{"title":"customNormalization","href":"/doc/api-reference/api-parameters/customNormalization"},{"title":"decompoundQuery","href":"/doc/api-reference/api-parameters/decompoundQuery"},{"title":"decompoundedAttributes","href":"/doc/api-reference/api-parameters/decompoundedAttributes"},{"title":"ignorePlurals","href":"/doc/api-reference/api-parameters/ignorePlurals"},{"title":"indexLanguages","href":"/doc/api-reference/api-parameters/indexLanguages"},{"title":"keepDiacriticsOnCharacters","href":"/doc/api-reference/api-parameters/keepDiacriticsOnCharacters"},{"title":"naturalLanguages","href":"/doc/api-reference/api-parameters/naturalLanguages"},{"title":"queryLanguages","href":"/doc/api-reference/api-parameters/queryLanguages"},{"title":"removeStopWords","href":"/doc/api-reference/api-parameters/removeStopWords"}]},{"group":"Rules","pages":[{"title":"enableRules","href":"/doc/api-reference/api-parameters/enableRules"},{"title":"ruleContexts","href":"/doc/api-reference/api-parameters/ruleContexts"}]},{"group":"Personalization","pages":[{"title":"allowReRankingOnPersonalization","href":"/doc/api-reference/api-parameters/allowReRankingOnPersonalization"},{"title":"enablePersonalization","href":"/doc/api-reference/api-parameters/enablePersonalization"},{"title":"personalizationImpact","href":"/doc/api-reference/api-parameters/personalizationImpact"},{"title":"userToken","href":"/doc/api-reference/api-parameters/userToken"}]},{"group":"Query strategy","pages":[{"title":"advancedSyntax","href":"/doc/api-reference/api-parameters/advancedSyntax"},{"title":"advancedSyntaxFeatures","href":"/doc/api-reference/api-parameters/advancedSyntaxFeatures"},{"title":"alternativesAsExact","href":"/doc/api-reference/api-parameters/alternativesAsExact"},{"title":"disableExactOnAttributes","href":"/doc/api-reference/api-parameters/disableExactOnAttributes"},{"title":"disablePrefixOnAttributes","href":"/doc/api-reference/api-parameters/disablePrefixOnAttributes"},{"title":"exactOnSingleWordQuery","href":"/doc/api-reference/api-parameters/exactOnSingleWordQuery"},{"title":"optionalWords","href":"/doc/api-reference/api-parameters/optionalWords"},{"title":"queryType","href":"/doc/api-reference/api-parameters/queryType"},{"title":"removeWordsIfNoResults","href":"/doc/api-reference/api-parameters/removeWordsIfNoResults"}]},{"group":"Performance","pages":[{"title":"allowCompressionOfIntegerArray","href":"/doc/api-reference/api-parameters/allowCompressionOfIntegerArray"},{"title":"numericAttributesForFiltering","href":"/doc/api-reference/api-parameters/numericAttributesForFiltering"}]},{"group":"Advanced","pages":[{"title":"analytics","href":"/doc/api-reference/api-parameters/analytics"},{"title":"analyticsTags","href":"/doc/api-reference/api-parameters/analyticsTags"},{"title":"attributeCriteriaComputedBy","href":"/doc/api-reference/api-parameters/attributeCriteriaComputedBy"},{"title":"attributeCriteriaComputedByMinProximity","href":"/doc/api-reference/api-parameters/attributeCriteriaComputedByMinProximity"},{"title":"attributeForDistinct","href":"/doc/api-reference/api-parameters/attributeForDistinct"},{"title":"clickAnalytics","href":"/doc/api-reference/api-parameters/clickAnalytics"},{"title":"distinct","href":"/doc/api-reference/api-parameters/distinct"},{"title":"enableABTest","href":"/doc/api-reference/api-parameters/enableABTest"},{"title":"enableReRanking","href":"/doc/api-reference/api-parameters/enableReRanking"},{"title":"getRankingInfo","href":"/doc/api-reference/api-parameters/getRankingInfo"},{"title":"minProximity","href":"/doc/api-reference/api-parameters/minProximity"},{"title":"percentileComputation","href":"/doc/api-reference/api-parameters/percentileComputation"},{"title":"renderingContent","href":"/doc/api-reference/api-parameters/renderingContent"},{"title":"replaceSynonymsInHighlight","href":"/doc/api-reference/api-parameters/replaceSynonymsInHighlight"},{"title":"responseFields","href":"/doc/api-reference/api-parameters/responseFields"},{"title":"synonyms","href":"/doc/api-reference/api-parameters/synonyms"},{"title":"userData","href":"/doc/api-reference/api-parameters/userData"}]}]}]},{"item":"Agent Studio","pages":[{"title":"Agent Studio","href":"/doc/rest-api/agent-studio"}]},{"item":"A/B testing","pages":[{"title":"A/B testing","href":"/doc/rest-api/abtesting-v3"}]},{"item":"Advanced Personalization","pages":[{"title":"Advanced Personalization","href":"/doc/rest-api/advanced-personalization"}]},{"item":"Analytics","pages":[{"title":"Analytics","href":"/doc/rest-api/analytics"}]},{"item":"Classic Personalization","pages":[{"title":"Classic Personalization","href":"/doc/rest-api/personalization"}]},{"item":"Composition","pages":[{"title":"Composition","href":"/doc/rest-api/composition"}]},{"item":"Crawler","pages":[{"title":"Crawler","href":"/doc/rest-api/crawler"}]},{"item":"Ingestion","pages":[{"title":"Ingestion","href":"/doc/rest-api/ingestion"}]},{"item":"Insights","pages":[{"title":"Insights","href":"/doc/rest-api/insights"}]},{"item":"Monitoring","pages":[{"title":"Monitoring","href":"/doc/rest-api/monitoring"}]},{"item":"Recommend","pages":[{"title":"Recommend","href":"/doc/rest-api/recommend"}]},{"item":"Query Suggestions","pages":[{"title":"Query Suggestions","href":"/doc/rest-api/query-suggestions"}]},{"item":"Suggested Actions","pages":[{"title":"Suggested Actions","href":"/doc/rest-api/suggested-actions"}]},{"item":"Usage","pages":[{"title":"Usage","href":"/doc/rest-api/usage"}]},{"item":"All APIs","pages":[{"title":"All APIs","href":"/doc/rest-api"}]}]}]},"basePath":"","title":"Create or update rules - Algolia","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}