[{"data":1,"prerenderedAt":2300},["ShallowReactive",2],{"docs-navigation":3,"docs-\u002Fdocs\u002Fsearch\u002Frules":331,"docs-\u002Fdocs\u002Fsearch\u002Frules-surround":2297},[4],{"title":5,"path":6,"stem":7,"children":8,"page":46},"Docs","\u002Fdocs","docs",[9,47,72,90,132,198,241,252,276,301],{"title":10,"description":11,"icon":12,"path":13,"stem":14,"children":15,"page":46},"Getting started","What Zaproo Search is, a quickstart, and wiring search into a storefront.","i-lucide-rocket","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",[16,22,28,34,40],{"title":17,"path":18,"stem":19,"description":20,"icon":21},"Introduction","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002F1.getting-started\u002F1.introduction","What Zaproo Search is, the five things you work with, and how a product catalog becomes a search box on your shop.","i-lucide-book-open-text",{"title":23,"path":24,"stem":25,"description":26,"icon":27},"Quickstart","\u002Fdocs\u002Fgetting-started\u002Fquickstart","docs\u002F1.getting-started\u002F2.quickstart","Set up search for your shop in the cabinet, from a new account to a first search, with the API and MCP as other ways to do the same.","i-lucide-zap",{"title":29,"path":30,"stem":31,"description":32,"icon":33},"Integrate a storefront","\u002Fdocs\u002Fgetting-started\u002Fstorefront","docs\u002F1.getting-started\u002F3.storefront","Build a search results page with facets and an autocomplete box on top of the search and suggest routes.","i-lucide-store",{"title":35,"path":36,"stem":37,"description":38,"icon":39},"JavaScript SDK","\u002Fdocs\u002Fgetting-started\u002Fjavascript-sdk","docs\u002F1.getting-started\u002F4.javascript-sdk","Search, autocomplete and event tracking from a storefront with one small client that runs in the browser, on your server and in edge functions.","i-lucide-braces",{"title":41,"path":42,"stem":43,"description":44,"icon":45},"AI shopping assistant","\u002Fdocs\u002Fgetting-started\u002Fai-assistant","docs\u002F1.getting-started\u002F5.ai-assistant","A chat widget for your storefront that finds products and answers questions from your indexes.","i-lucide-sparkles",false,{"title":48,"description":49,"icon":50,"path":51,"stem":52,"children":53,"page":46},"Account and team","Sign-in, sessions, organizations, members, roles and projects.","i-lucide-users","\u002Fdocs\u002Faccount","docs\u002F2.account",[54,60,66],{"title":55,"path":56,"stem":57,"description":58,"icon":59},"Account and sign-in","\u002Fdocs\u002Faccount\u002Fsign-in","docs\u002F2.account\u002F1.sign-in","Create an account, verify your email, stay signed in, manage signed-in devices and change or reset your password.","i-lucide-log-in",{"title":61,"path":62,"stem":63,"description":64,"icon":65},"Organizations, members and roles","\u002Fdocs\u002Faccount\u002Forganizations","docs\u002F2.account\u002F2.organizations","What an organization holds, how to add members, and what owners, admins and members may do.","i-lucide-building-2",{"title":67,"path":68,"stem":69,"description":70,"icon":71},"Projects","\u002Fdocs\u002Faccount\u002Fprojects","docs\u002F2.account\u002F3.projects","Group the indices and API keys of one shop or one environment, and keep staging apart from production.","i-lucide-folder-kanban",{"title":73,"description":74,"icon":75,"path":76,"stem":77,"children":78,"page":46},"API keys and security","Secret and public keys, scopes, allowed origins, rate limits and errors.","i-lucide-key-round","\u002Fdocs\u002Fkeys","docs\u002F3.keys",[79,84],{"title":80,"path":81,"stem":82,"description":83,"icon":75},"API keys","\u002Fdocs\u002Fkeys\u002Fapi-keys","docs\u002F3.keys\u002F1.api-keys","Secret and public keys, full and read access, index scope, allowed origins, expiry, and how to revoke a key.",{"title":85,"path":86,"stem":87,"description":88,"icon":89},"Rate limits and errors","\u002Fdocs\u002Fkeys\u002Frate-limits","docs\u002F3.keys\u002F2.rate-limits","How many requests each route accepts per minute, what a 429 looks like, the error format and every error code with its HTTP status.","i-lucide-gauge",{"title":91,"description":92,"icon":93,"path":94,"stem":95,"children":96,"page":46},"Indexing","Indices, languages, mappings, documents, tasks, full catalog sync and reindexing.","i-lucide-database","\u002Fdocs\u002Findexing","docs\u002F4.indexing",[97,102,108,114,120,126],{"title":98,"path":99,"stem":100,"description":101,"icon":93},"Indices and languages","\u002Fdocs\u002Findexing\u002Findices","docs\u002F4.indexing\u002F1.indices","Create an index, pick its language, read its status, and change the language later with a reindex.",{"title":103,"path":104,"stem":105,"description":106,"icon":107},"Mapping and fields","\u002Fdocs\u002Findexing\u002Fmapping","docs\u002F4.indexing\u002F2.mapping","Field types, the five flags that decide what a field is used for, text analysis options, unmapped fields, and which changes need a reindex.","i-lucide-table-properties",{"title":109,"path":110,"stem":111,"description":112,"icon":113},"Documents and tasks","\u002Fdocs\u002Findexing\u002Fdocuments","docs\u002F4.indexing\u002F3.documents","Upload, browse and delete documents in the cabinet or through the API, follow each write as a task, and retry safely with Idempotency-Key.","i-lucide-file-json",{"title":115,"path":116,"stem":117,"description":118,"icon":119},"Full catalog sync","\u002Fdocs\u002Findexing\u002Ffull-sync","docs\u002F4.indexing\u002F4.full-sync","Replace the whole catalog with a replace session, so products missing from your export disappear from search, without downtime.","i-lucide-refresh-cw",{"title":121,"path":122,"stem":123,"description":124,"icon":125},"Reindex and versions","\u002Fdocs\u002Findexing\u002Fversions","docs\u002F4.indexing\u002F5.versions","Rebuild an index with its saved mapping and swap it in without downtime, follow or cancel the rebuild, and read activeVersion and buildingVersion.","i-lucide-git-compare-arrows",{"title":127,"path":128,"stem":129,"description":130,"icon":131},"Data source","\u002Fdocs\u002Findexing\u002Fdata-source","docs\u002F4.indexing\u002F6.data-source","Let Zaproo download your product feed on a schedule, map it to documents, write only what changed and delete what left the feed.","i-lucide-rss",{"title":133,"description":134,"icon":135,"path":136,"stem":137,"children":138,"page":46},"Integrations","Connect your shop. Magento 2, product feeds and the API work today; more platforms are coming.","i-lucide-plug-zap","\u002Fdocs\u002Fintegrations","docs\u002F4.integrations",[139,145,151,156,162,168,173,178,183,188,193],{"title":140,"path":141,"stem":142,"description":143,"icon":144},"Integrations overview","\u002Fdocs\u002Fintegrations\u002Foverview","docs\u002F4.integrations\u002F01.overview","The ways to get your catalog into Zaproo Search, which one to pick, and how a connected shop shows up in the cabinet.","i-lucide-layout-grid",{"title":146,"path":147,"stem":148,"description":149,"icon":150},"Magento 2","\u002Fdocs\u002Fintegrations\u002Fmagento","docs\u002F4.integrations\u002F02.magento","Install the Zaproo Search module for Magento 2, connect each store view to its own index, and keep the catalog in sync.","i-lucide-shopping-cart",{"title":152,"path":153,"stem":154,"description":155,"icon":131},"Product feed","\u002Fdocs\u002Fintegrations\u002Fproduct-feed","docs\u002F4.integrations\u002F03.product-feed","Connect any shop that can publish its catalog as a feed. You set it up in the cabinet, and Zaproo downloads the feed on a schedule and writes only what changed.",{"title":157,"path":158,"stem":159,"description":160,"icon":161},"REST API and MCP","\u002Fdocs\u002Fintegrations\u002Frest-api-and-mcp","docs\u002F4.integrations\u002F04.rest-api-and-mcp","Send documents from your own code with the REST API, or let an AI agent manage the index over MCP.","i-lucide-code",{"title":163,"path":164,"stem":165,"description":166,"icon":167},"Shopify","\u002Fdocs\u002Fintegrations\u002Fshopify","docs\u002F4.integrations\u002F05.shopify","A Zaproo Search integration for Shopify is coming soon. Until then, connect the shop through a product feed or the REST API.","i-lucide-shopping-bag",{"title":169,"path":170,"stem":171,"description":172,"icon":167},"WooCommerce","\u002Fdocs\u002Fintegrations\u002Fwoocommerce","docs\u002F4.integrations\u002F06.woocommerce","A Zaproo Search integration for WooCommerce is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":174,"path":175,"stem":176,"description":177,"icon":167},"Shopware","\u002Fdocs\u002Fintegrations\u002Fshopware","docs\u002F4.integrations\u002F07.shopware","A Zaproo Search integration for Shopware is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":179,"path":180,"stem":181,"description":182,"icon":167},"BigCommerce","\u002Fdocs\u002Fintegrations\u002Fbigcommerce","docs\u002F4.integrations\u002F08.bigcommerce","A Zaproo Search integration for BigCommerce is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":184,"path":185,"stem":186,"description":187,"icon":167},"PrestaShop","\u002Fdocs\u002Fintegrations\u002Fprestashop","docs\u002F4.integrations\u002F09.prestashop","A Zaproo Search integration for PrestaShop is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":189,"path":190,"stem":191,"description":192,"icon":167},"commercetools","\u002Fdocs\u002Fintegrations\u002Fcommercetools","docs\u002F4.integrations\u002F10.commercetools","A Zaproo Search integration for commercetools is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":194,"path":195,"stem":196,"description":197,"icon":167},"Salesforce Commerce Cloud","\u002Fdocs\u002Fintegrations\u002Fsalesforce-commerce-cloud","docs\u002F4.integrations\u002F11.salesforce-commerce-cloud","A Zaproo Search integration for Salesforce Commerce Cloud is coming soon. Until then, connect the shop through a product feed or the REST API.",{"title":199,"description":200,"icon":201,"path":202,"stem":203,"children":204,"page":46},"Search and relevance","The search API, search profiles, facets, synonyms and ranking rules.","i-lucide-search","\u002Fdocs\u002Fsearch","docs\u002F5.search",[205,211,217,223,229,235],{"title":206,"path":207,"stem":208,"description":209,"icon":210},"Search API","\u002Fdocs\u002Fsearch\u002Fsearch-api","docs\u002F5.search\u002F1.search-api","Try a search in the playground, then the search request and response for developers, with every filter form, sorting, paging, highlighting and the inline profile.","i-lucide-search-code",{"title":212,"path":213,"stem":214,"description":215,"icon":216},"Search profiles","\u002Fdocs\u002Fsearch\u002Fprofiles","docs\u002F5.search\u002F2.profiles","Every setting of a search profile, what it does to results, and the mistakes to avoid.","i-lucide-sliders-horizontal",{"title":218,"path":219,"stem":220,"description":221,"icon":222},"Facets","\u002Fdocs\u002Fsearch\u002Ffacets","docs\u002F5.search\u002F3.facets","The filter panels next to the results, the four facet types, index facets and profile facets, and how a shopper's clicks change the counts.","i-lucide-list-filter",{"title":224,"path":225,"stem":226,"description":227,"icon":228},"Synonyms","\u002Fdocs\u002Fsearch\u002Fsynonyms","docs\u002F5.search\u002F4.synonyms","Let different words find the same products, with equivalent and one-way rules, bulk import and export in the Solr format, and no reindex.","i-lucide-arrow-left-right",{"title":230,"path":231,"stem":232,"description":233,"icon":234},"Ranking rules","\u002Fdocs\u002Fsearch\u002Frules","docs\u002F5.search\u002F5.rules","Change the results for chosen searches. Put products first, hide them, lift or lower a brand, narrow the results or weigh fields differently, on a schedule and per profile.","i-lucide-list-ordered",{"title":236,"path":237,"stem":238,"description":239,"icon":240},"Language groups","\u002Fdocs\u002Fsearch\u002Flanguage-groups","docs\u002F5.search\u002F6.language-groups","Let each store of a multilingual shop find its products by the other stores' text, so an English search on the Estonian store still finds the Estonian product.","i-lucide-languages",{"title":242,"description":243,"icon":244,"path":245,"stem":246,"children":247,"page":46},"Autocomplete","Query suggestions as the shopper types.","i-lucide-text-cursor-input","\u002Fdocs\u002Fautocomplete","docs\u002F6.autocomplete",[248],{"title":242,"path":249,"stem":250,"description":251,"icon":244},"\u002Fdocs\u002Fautocomplete\u002Fsuggestions","docs\u002F6.autocomplete\u002F1.suggestions","Set up query suggestions in the cabinet. They are built every hour from your shoppers' searches, field values and custom entries.",{"title":253,"description":254,"icon":255,"path":256,"stem":257,"children":258,"page":46},"Analytics","Searches, zero-result queries and latency.","i-lucide-chart-line","\u002Fdocs\u002Fanalytics","docs\u002F7.analytics",[259,264,270],{"title":260,"path":261,"stem":262,"description":263,"icon":255},"Search analytics","\u002Fdocs\u002Fanalytics\u002Fsearch-analytics","docs\u002F7.analytics\u002F1.search-analytics","What the analytics page counts, which traffic it leaves out, how the headline numbers are defined, how comparisons and retention work, and how to get the weekly digest.",{"title":265,"path":266,"stem":267,"description":268,"icon":269},"Reports","\u002Fdocs\u002Fanalytics\u002Freports","docs\u002F7.analytics\u002F2.reports","Every analytics report with the definition of each column, the opportunities list and its fix buttons, the per-query view with before and after, and the CSV download.","i-lucide-table",{"title":271,"path":272,"stem":273,"description":274,"icon":275},"Event tracking","\u002Fdocs\u002Fanalytics\u002Fevent-tracking","docs\u002F7.analytics\u002F3.event-tracking","Send clicks, add-to-cart, purchases and suggestion clicks from your storefront, tie them to the search with searchId, and a copy-paste script that does it.","i-lucide-mouse-pointer-click",{"title":277,"description":278,"icon":279,"path":280,"stem":281,"children":282,"page":46},"AI agents (MCP)","Connect Claude Code or any MCP client and manage search from an agent.","i-lucide-bot","\u002Fdocs\u002Fmcp","docs\u002F8.mcp",[283,289,295],{"title":284,"path":285,"stem":286,"description":287,"icon":288},"MCP setup","\u002Fdocs\u002Fmcp\u002Fsetup","docs\u002F8.mcp\u002F1.setup","Connect Claude Code or another MCP client to your project from the cabinet's MCP connection page, and let an agent manage indices, documents, profiles, synonyms and rules.","i-lucide-plug",{"title":290,"path":291,"stem":292,"description":293,"icon":294},"MCP tools","\u002Fdocs\u002Fmcp\u002Ftools","docs\u002F8.mcp\u002F2.tools","Every tool the Zaproo Search MCP server offers, what an agent can do with each group, and prompts to start from.","i-lucide-wrench",{"title":296,"path":297,"stem":298,"description":299,"icon":300},"Resources and prompts","\u002Fdocs\u002Fmcp\u002Fresources","docs\u002F8.mcp\u002F3.resources","The index resources an MCP client can read, the tune_relevance prompt, and the errors the MCP server answers.","i-lucide-library",{"title":302,"description":303,"icon":304,"path":305,"stem":306,"children":307,"page":46},"Reference","Every REST route, every limit, plans and billing, and status.","i-lucide-book-open","\u002Fdocs\u002Freference","docs\u002F9.reference",[308,314,319,325],{"title":309,"path":310,"stem":311,"description":312,"icon":313},"REST API","\u002Fdocs\u002Freference\u002Frest-api","docs\u002F9.reference\u002F1.rest-api","The routes of the Zaproo Search REST API, grouped by area, with who may call it.","i-lucide-list-tree",{"title":315,"path":316,"stem":317,"description":318,"icon":89},"Limits","\u002Fdocs\u002Freference\u002Flimits","docs\u002F9.reference\u002F2.limits","Every size limit, cap and default of the Zaproo Search API in one place, with what happens when you reach it.",{"title":320,"path":321,"stem":322,"description":323,"icon":324},"Plans and billing","\u002Fdocs\u002Freference\u002Fbilling","docs\u002F9.reference\u002F3.billing","Check your plan and usage on the Billing & usage page, change the plan, download invoices, and see how quotas and proration work.","i-lucide-credit-card",{"title":326,"path":327,"stem":328,"description":329,"icon":330},"Status","\u002Fdocs\u002Freference\u002Fstatus","docs\u002F9.reference\u002F4.status","The status page and the status route, what each service covers and how to use them in your own monitoring.","i-lucide-activity",{"id":332,"title":230,"body":333,"description":233,"extension":2292,"meta":2293,"navigation":2294,"path":231,"seo":2295,"stem":232,"__hash__":2296},"docs\u002Fdocs\u002F5.search\u002F5.rules.md",{"type":334,"value":335,"toc":2257},"minimark",[336,341,359,362,377,380,383,387,395,498,506,510,515,601,605,611,618,666,669,675,705,713,716,719,732,740,743,755,826,829,843,846,855,858,861,870,876,987,999,1003,1009,1024,1027,1035,1126,1170,1300,1358,1426,1429,1433,1454,1458,1468,1472,1483,1486,1503,1505,1508,1591,1605,1609,1635,1649,1652,1658,1684,1767,1770,1773,1817,1820,1824,1827,1844,1847,1936,1940,1943,1947,1950,1953,1956,1959,1962,1986,2107,2170,2174,2225,2229,2253],[337,338,340],"h2",{"id":339},"what-a-rule-is","What a rule is",[342,343,344,345,349,350,354,355,358],"p",{},"A ranking rule changes the results of chosen searches. \"When someone searches for ",[346,347,348],"em",{},"tape",", put these two rolls first.\" \"During the Christmas sale, lift the brand Boxwell on every search.\" \"When the search box opens, show the three bestsellers.\" A rule has a ",[351,352,353],"strong",{},"when"," (the searches it fires for) and a ",[351,356,357],{},"then"," (one or more actions).",[342,360,361],{},"Rules and profiles do different jobs:",[363,364,365,374],"ul",{},[366,367,368,369,373],"li",{},"A ",[370,371,372],"a",{"href":213},"search profile"," sets how every search of one search box works: the fields, the typo tolerance, the facets and the sorts.",[366,375,376],{},"A rule changes a few searches, or every search for a while, without touching the profile. Merchandisers can add and remove rules for campaigns while the profile stays the same.",[342,378,379],{},"If a change should hold for every search, all the time, change the profile. If it is about particular words, particular listing pages or a date range, write a rule.",[342,381,382],{},"Rules belong to an index. They run on every profile of it unless you limit them to some profiles. A saved change applies from the next search on, with no reindex.",[337,384,386],{"id":385},"create-a-rule","Create a rule",[342,388,389,390,394],{},"Only organization owners and admins can create and change rules. A rule's preview needs a search profile, so ",[370,391,393],{"href":392},"\u002Fdocs\u002Fsearch\u002Fprofiles#create-a-profile","create one"," first.",[396,397,398,409,421,428,459,473,482],"ol",{},[366,399,400,401,404,405,408],{},"Open the index and click ",[351,402,403],{},"Rules",", then ",[351,406,407],{},"New rule",".",[366,410,411,412,416,417,420],{},"Pick a starting point from the ",[370,413,415],{"href":414},"#templates","templates",". ",[351,418,419],{},"Start from scratch"," gives an empty rule.",[366,422,423,424,427],{},"Give the rule a ",[351,425,426],{},"Name"," that says what it is for.",[366,429,430,431,434,435,438,439,442,443,446,447,450,451,454,455,408],{},"Under ",[351,432,433],{},"When someone searches for",", pick ",[351,436,437],{},"Chosen searches"," and type the ",[351,440,441],{},"Searches"," and how they ",[351,444,445],{},"Match",". Or pick ",[351,448,449],{},"Every search"," or ",[351,452,453],{},"Empty search",". See ",[370,456,458],{"href":457},"#when-it-fires","When it fires",[366,460,430,461,464,465,468,469,408],{},[351,462,463],{},"Then",", set the actions. ",[351,466,467],{},"Add an action"," adds another. See ",[370,470,472],{"href":471},"#actions","Actions",[366,474,430,475,478,479,408],{},[351,476,477],{},"When it runs",", pick the dates and the profiles. See ",[370,480,477],{"href":481},"#when-it-runs",[366,483,484,485,489,490,493,494,497],{},"Check the ",[370,486,488],{"href":487},"#preview-and-test","Preview"," on the right, then click ",[351,491,492],{},"Save rule",". The ",[351,495,496],{},"On"," switch at the top turns the rule on or off.",[342,499,500],{},[501,502],"img",{"alt":503,"src":504,"title":505},"The rule editor for tape with a match of exactly, the search tape, and a preview where the two pinned products come first","\u002Fdocs\u002Fscreenshots\u002Frule-editor.png","The rule editor with its live preview",[507,508,509],"h3",{"id":415},"Templates",[342,511,512,514],{},[351,513,407],{}," offers a starting point. Every template can be changed before you save.",[516,517,518,531],"table",{},[519,520,521],"thead",{},[522,523,524,528],"tr",{},[525,526,527],"th",{},"Template",[525,529,530],{},"What it sets up",[532,533,534,543,551,559,567,575,583,594],"tbody",{},[522,535,536,540],{},[537,538,539],"td",{},"Feature products for a search",[537,541,542],{},"Put chosen products first when people search for a word.",[522,544,545,548],{},[537,546,547],{},"Promote a brand or category",[537,549,550],{},"Lift a brand or category higher in the results.",[522,552,553,556],{},[537,554,555],{},"Push down products",[537,557,558],{},"Move a brand or category lower without hiding it.",[522,560,561,564],{},[537,562,563],{},"Send a search to a category",[537,565,566],{},"Show only one category for a search.",[522,568,569,572],{},[537,570,571],{},"Hide products from a search",[537,573,574],{},"Keep chosen products out of the results for a search.",[522,576,577,580],{},[537,578,579],{},"Campaign for every search",[537,581,582],{},"Lift products on every search for a week. The dates start at the current hour.",[522,584,585,588],{},[537,586,587],{},"Products for an empty search",[537,589,590,591,408],{},"Put chosen products first when the search box opens, before anything is typed. See ",[370,592,453],{"href":593},"#empty-search",[522,595,596,598],{},[537,597,419],{},[537,599,600],{},"An empty rule: pick the searches and actions yourself.",[507,602,604],{"id":603},"the-rules-list","The rules list",[342,606,607,608,610],{},"The ",[351,609,403],{}," page lists the rules in the order they run. Each row reads as a sentence, such as \"Search is tape · Pin 2 products · All profiles\", with its status and an on\u002Foff switch.",[342,612,613],{},[501,614],{"alt":615,"src":616,"title":617},"The Rules page with a try a search box showing that one rule applies to tape, and two rules: tape pin 2 products, live, and Christmas packaging, scheduled","\u002Fdocs\u002Fscreenshots\u002Frules-list.png","The rules list, with a search to see which rules apply",[363,619,620,630,636],{},[366,621,622,625,626,408],{},[351,623,624],{},"Find by name or search phrase"," narrows the list, and the status buttons filter it by ",[370,627,629],{"href":628},"#status","status",[366,631,632,635],{},[351,633,634],{},"Try a search"," shows which rules fire for a search you type, through the profile you pick, and links each one.",[366,637,638,639,642,643,646,647,646,650,646,653,656,657,660,661,665],{},"The row menu (",[351,640,641],{},"⋯",") has ",[351,644,645],{},"Edit",", ",[351,648,649],{},"Duplicate",[351,651,652],{},"Move up",[351,654,655],{},"Move down"," and ",[351,658,659],{},"Delete",". Delete asks you to confirm. See ",[370,662,664],{"href":663},"#order","Order"," for moving rules.",[337,667,458],{"id":668},"when-it-fires",[342,670,671,672,674],{},"The editor's ",[351,673,433],{}," block holds the conditions. Pick one of three:",[363,676,677,690,698],{},[366,678,679,681,682,686,687,408],{},[351,680,437],{},": the rule fires when the search matches one of its ",[370,683,685],{"href":684},"#searches","phrases",", compared as set under ",[370,688,445],{"href":689},"#match",[366,691,692,694,695,408],{},[351,693,449],{},": the rule fires whatever the shopper types. See ",[370,696,449],{"href":697},"#every-search",[366,699,700,702,703,408],{},[351,701,453],{},": the rule fires only when nothing is typed and no filter is picked. See ",[370,704,453],{"href":593},[342,706,707,708,712],{},"A rule with ",[370,709,711],{"href":710},"#only-on-filtered-pages","filtered pages"," also needs the request to carry those filters.",[507,714,441],{"id":715},"searches",[342,717,718],{},"The phrases the rule fires for, up to 100 of 1 to 200 characters each. Any one of them is enough. Phrases and searches are compared after the same clean-up:",[363,720,721,724,727],{},[366,722,723],{},"Capital letters and accents do not matter: \"cafe\" matches \"Café\".",[366,725,726],{},"Anything that is not a letter or a digit counts as a space, and repeated spaces count as one: \"t-shirt\" matches \"t shirt\".",[366,728,729,731],{},[370,730,224],{"href":225}," count too. A rule for \"tape\" also fires for \"scotch\" when a synonym links the two.",[342,733,734,735,739],{},"If the profile searched a corrected spelling after ",[370,736,738],{"href":737},"\u002Fdocs\u002Fsearch\u002Fprofiles#did-you-mean","did you mean",", rules match the corrected query.",[507,741,445],{"id":742},"match",[342,744,745,746,646,749,656,752,408],{},"How a phrase is compared with the whole search. The cabinet calls the three options ",[351,747,748],{},"exactly",[351,750,751],{},"anything containing",[351,753,754],{},"anything starting with",[516,756,757,775],{},[519,758,759],{},[522,760,761,766,769,772],{},[525,762,763],{},[764,765,742],"code",{},[525,767,768],{},"Fires when",[525,770,771],{},"Phrase \"bubble\" fires for",[525,773,774],{},"Does not fire for",[532,776,777,794,810],{},[522,778,779,785,788,791],{},[537,780,781,784],{},[764,782,783],{},"is"," (default)",[537,786,787],{},"the search is the phrase",[537,789,790],{},"\"bubble\", \"Bubble!\"",[537,792,793],{},"\"bubble wrap\", \"bubblewrap\"",[522,795,796,801,804,807],{},[537,797,798],{},[764,799,800],{},"contains",[537,802,803],{},"the phrase appears as whole words anywhere",[537,805,806],{},"\"bubble\", \"large bubble wrap\"",[537,808,809],{},"\"bubblewrap\"",[522,811,812,817,820,823],{},[537,813,814],{},[764,815,816],{},"startsWith",[537,818,819],{},"the search begins with the phrase as whole words",[537,821,822],{},"\"bubble\", \"bubble wrap\"",[537,824,825],{},"\"large bubble wrap\", \"bubblewrap\"",[342,827,828],{},"All three compare whole words. \"bubble\" never fires for \"bubblewrap\", because \"bubblewrap\" is a different word.",[342,830,831,832,834,835,838,839,842],{},"Over the API, ",[764,833,742],{}," takes a fourth value, ",[764,836,837],{},"empty",", for an ",[370,840,841],{"href":593},"empty-search rule",". It compares no phrases, so the cabinet shows it as its own choice rather than in this list.",[507,844,449],{"id":845},"every-search",[342,847,848,849,851,852,854],{},"A rule with no phrases fires on every search, the empty query on a category page included. In the editor, pick ",[351,850,449],{},". Use it for campaigns, together with a schedule. To change only what a just-opened search box shows, use an ",[370,853,841],{"href":593}," instead.",[507,856,453],{"id":857},"empty-search",[342,859,860],{},"An empty-search rule fires only when the search has no query and no filters. On a storefront, that is the moment the shopper clicks into the search box and the dropdown opens. Pin your bestsellers or new arrivals with it, and the dropdown has products in it before the shopper types a letter.",[342,862,863,864,866,867,869],{},"In the editor, pick ",[351,865,453],{},", or start from the ",[351,868,587],{}," template. The rule has no phrases and no filtered pages. Once the shopper types something or picks a filter, the rule stops firing and the usual results come back. A category page counts as filtered, so the rule leaves category pages alone too.",[342,871,872,873,875],{},"The rule only changes results. Your storefront still has to ask for them, with a search that has an empty query, when the search box gets focus. With the ",[370,874,35],{"href":36},":",[877,878,883],"pre",{"className":879,"code":880,"language":881,"meta":882,"style":882},"language-js shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","input.addEventListener('focus', async () => {\n  if (input.value) return;\n  const { items } = await zaprooSearch.search({ perPage: 6 });\n  showDropdown(items);\n});\n","js","",[764,884,885,920,935,972,981],{"__ignoreMap":882},[886,887,890,894,898,901,905,907,911,914,917],"span",{"class":888,"line":889},"line",1,[886,891,893],{"class":892},"s7iLA","input.",[886,895,897],{"class":896},"s6m-Y","addEventListener",[886,899,900],{"class":892},"(",[886,902,904],{"class":903},"semJd","'focus'",[886,906,646],{"class":892},[886,908,910],{"class":909},"sklAV","async",[886,912,913],{"class":892}," () ",[886,915,916],{"class":909},"=>",[886,918,919],{"class":892}," {\n",[886,921,923,926,929,932],{"class":888,"line":922},2,[886,924,925],{"class":909},"  if",[886,927,928],{"class":892}," (input.value) ",[886,930,931],{"class":909},"return",[886,933,934],{"class":892},";\n",[886,936,938,941,944,948,951,954,957,960,963,966,969],{"class":888,"line":937},3,[886,939,940],{"class":909},"  const",[886,942,943],{"class":892}," { ",[886,945,947],{"class":946},"ssYy9","items",[886,949,950],{"class":892}," } ",[886,952,953],{"class":909},"=",[886,955,956],{"class":909}," await",[886,958,959],{"class":892}," zaprooSearch.",[886,961,962],{"class":896},"search",[886,964,965],{"class":892},"({ perPage: ",[886,967,968],{"class":946},"6",[886,970,971],{"class":892}," });\n",[886,973,975,978],{"class":888,"line":974},4,[886,976,977],{"class":896},"  showDropdown",[886,979,980],{"class":892},"(items);\n",[886,982,984],{"class":888,"line":983},5,[886,985,986],{"class":892},"});\n",[342,988,989,990,993,994,998],{},"Pins come first only when the results are sorted by relevance, which is the default. Without a pin or a boost, an empty search lists products by id. Over the API, write the condition as ",[764,991,992],{},"\"when\": {\"match\": \"empty\"}",". You can show ",[370,995,997],{"href":996},"\u002Fdocs\u002Fautocomplete\u002Fsuggestions#empty-query-suggestions","popular searches"," in the same dropdown: they come from autocomplete, which answers an empty query on its own.",[507,1000,1002],{"id":1001},"only-on-filtered-pages","Only on filtered pages",[342,1004,430,1005,1008],{},[351,1006,1007],{},"Only on filtered pages (advanced)",", a rule can require filters in the request. This is for brand or category listing pages. The rule fires only when the shopper's search is filtered like this.",[363,1010,1011,1021],{},[366,1012,1013,1014,1017,1018,408],{},"A value or a list fires when the request filters that field with at least these values. A condition ",[764,1015,1016],{},"{\"brand\": \"Boxwell\"}"," holds for a request with ",[764,1019,1020],{},"{\"brand\": [\"Boxwell\", \"Acme\"]}",[366,1022,1023],{},"A range, an exists check or category nodes must equal the request's filter exactly. Write the condition the way your storefront sends the filter.",[337,1025,472],{"id":1026},"actions",[342,1028,607,1029,1031,1032,1034],{},[351,1030,463],{}," block holds 1 to 10 actions. ",[351,1033,467],{}," offers the five kinds below.",[1036,1037,1041,1045,1052,1098,1101,1116],"setting",{"name":1038,"type":1039,"values":1040},"pin","action","1 to 24 products",[507,1042,1044],{"id":1043},"put-products-first","Put products first",[342,1046,1047,1048,1051],{},"Chosen products lead the results, in your order. In the editor, pick them with the product search and drag them into order. Each pinned hit carries ",[764,1049,1050],{},"_pinned: true"," in the response.",[877,1053,1057],{"className":1054,"code":1055,"language":1056,"meta":882,"style":882},"language-json shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","{ \"type\": \"pin\", \"ids\": [\"tape-48\", \"tape-50\", \"tape-dispenser\"] }\n","json",[764,1058,1059],{"__ignoreMap":882},[886,1060,1061,1064,1068,1071,1074,1076,1079,1082,1085,1087,1090,1092,1095],{"class":888,"line":889},[886,1062,1063],{"class":892},"{ ",[886,1065,1067],{"class":1066},"sb7M8","\"type\"",[886,1069,1070],{"class":892},": ",[886,1072,1073],{"class":903},"\"pin\"",[886,1075,646],{"class":892},[886,1077,1078],{"class":1066},"\"ids\"",[886,1080,1081],{"class":892},": [",[886,1083,1084],{"class":903},"\"tape-48\"",[886,1086,646],{"class":892},[886,1088,1089],{"class":903},"\"tape-50\"",[886,1091,646],{"class":892},[886,1093,1094],{"class":903},"\"tape-dispenser\"",[886,1096,1097],{"class":892},"] }\n",[342,1099,1100],{},"A pinned product shows even when it does not match the search words. It still has to pass every filter: the profile's filters and exclusions, the rule filters, and the shopper's facet clicks.",[1102,1103,1104],"template",{"v-slot:tips":882},[363,1105,1106,1113],{},[366,1107,1108,1109,408],{},"Pins only apply when results are ordered by relevance. See ",[370,1110,1112],{"href":1111},"#pins-sorting-and-facets","Pins, sorting and facets",[366,1114,1115],{},"Pin few products. Shoppers read the first row; 3 to 6 pins usually beat 24.",[1102,1117,1118],{"v-slot:related":882},[363,1119,1120],{},[366,1121,1122],{},[370,1123,1125],{"href":1124},"#hide-products","Hide products",[1036,1127,1130,1133,1136,1163],{"name":1128,"type":1039,"values":1129},"hide","1 to 500 products",[507,1131,1125],{"id":1132},"hide-products",[342,1134,1135],{},"Chosen products never show for these searches. Hiding beats pinning. A product that one rule hides and another pins stays hidden.",[877,1137,1139],{"className":1054,"code":1138,"language":1056,"meta":882,"style":882},"{ \"type\": \"hide\", \"ids\": [\"tape-48-old\"] }\n",[764,1140,1141],{"__ignoreMap":882},[886,1142,1143,1145,1147,1149,1152,1154,1156,1158,1161],{"class":888,"line":889},[886,1144,1063],{"class":892},[886,1146,1067],{"class":1066},[886,1148,1070],{"class":892},[886,1150,1151],{"class":903},"\"hide\"",[886,1153,646],{"class":892},[886,1155,1078],{"class":1066},[886,1157,1081],{"class":892},[886,1159,1160],{"class":903},"\"tape-48-old\"",[886,1162,1097],{"class":892},[1102,1164,1165],{"v-slot:tips":882},[363,1166,1167],{},[366,1168,1169],{},"To hide a whole brand or category from one storefront for every search, an exclusion in the profile is simpler than a rule.",[1036,1171,1174,1178,1185,1188,1242,1287],{"name":1172,"type":1039,"values":1173},"boost","factor 0.1 to 10",[507,1175,1177],{"id":1176},"lift-or-lower-products","Lift or lower products",[342,1179,1180,1181,1184],{},"Moves a brand, a category or any product group up or down. The relevance of every product that matches the filters is multiplied by ",[764,1182,1183],{},"factor",". Above 1 lifts, below 1 lowers.",[342,1186,1187],{},"The editor offers named steps and a custom value:",[516,1189,1190,1200],{},[519,1191,1192],{},[522,1193,1194,1197],{},[525,1195,1196],{},"Step",[525,1198,1199],{},"Factor",[532,1201,1202,1210,1218,1226,1234],{},[522,1203,1204,1207],{},[537,1205,1206],{},"Lower a lot",[537,1208,1209],{},"0.3",[522,1211,1212,1215],{},[537,1213,1214],{},"Lower",[537,1216,1217],{},"0.6",[522,1219,1220,1223],{},[537,1221,1222],{},"Lift",[537,1224,1225],{},"2",[522,1227,1228,1231],{},[537,1229,1230],{},"Lift a lot",[537,1232,1233],{},"5",[522,1235,1236,1239],{},[537,1237,1238],{},"Custom",[537,1240,1241],{},"any value from 0.1 to 10",[877,1243,1245],{"className":1054,"code":1244,"language":1056,"meta":882,"style":882},"{ \"type\": \"boost\", \"filters\": { \"brand\": \"Boxwell\" }, \"factor\": 2 }\n",[764,1246,1247],{"__ignoreMap":882},[886,1248,1249,1251,1253,1255,1258,1260,1263,1266,1269,1271,1274,1277,1280,1282,1284],{"class":888,"line":889},[886,1250,1063],{"class":892},[886,1252,1067],{"class":1066},[886,1254,1070],{"class":892},[886,1256,1257],{"class":903},"\"boost\"",[886,1259,646],{"class":892},[886,1261,1262],{"class":1066},"\"filters\"",[886,1264,1265],{"class":892},": { ",[886,1267,1268],{"class":1066},"\"brand\"",[886,1270,1070],{"class":892},[886,1272,1273],{"class":903},"\"Boxwell\"",[886,1275,1276],{"class":892}," }, ",[886,1278,1279],{"class":1066},"\"factor\"",[886,1281,1070],{"class":892},[886,1283,1225],{"class":946},[886,1285,1286],{"class":892}," }\n",[1102,1288,1289],{"v-slot:tips":882},[363,1290,1291,1294,1297],{},[366,1292,1293],{},"A lift is not a pin. A lifted product that matches the search badly can still rank below a good match. Use a pin to put a product first for sure.",[366,1295,1296],{},"Several boosts multiply for a product that matches more than one, up to 100 times in total.",[366,1298,1299],{},"Boosts change relevance, so they have no effect when the shopper sorts by price or another field.",[1036,1301,1303,1307,1310,1348],{"name":1302,"type":1039},"filter",[507,1304,1306],{"id":1305},"show-only","Show only",[342,1308,1309],{},"Narrows the results to a brand, category or other group, like a profile filter. Only products that match show for these searches, and facet counts narrow with them.",[877,1311,1313],{"className":1054,"code":1312,"language":1056,"meta":882,"style":882},"{ \"type\": \"filter\", \"filters\": { \"category\": { \"terms\": [\"Tapes>Packing tape\"] } } }\n",[764,1314,1315],{"__ignoreMap":882},[886,1316,1317,1319,1321,1323,1326,1328,1330,1332,1335,1337,1340,1342,1345],{"class":888,"line":889},[886,1318,1063],{"class":892},[886,1320,1067],{"class":1066},[886,1322,1070],{"class":892},[886,1324,1325],{"class":903},"\"filter\"",[886,1327,646],{"class":892},[886,1329,1262],{"class":1066},[886,1331,1265],{"class":892},[886,1333,1334],{"class":1066},"\"category\"",[886,1336,1265],{"class":892},[886,1338,1339],{"class":1066},"\"terms\"",[886,1341,1081],{"class":892},[886,1343,1344],{"class":903},"\"Tapes>Packing tape\"",[886,1346,1347],{"class":892},"] } } }\n",[1102,1349,1350],{"v-slot:tips":882},[363,1351,1352,1355],{},[366,1353,1354],{},"The \"Send a search to a category\" template uses this action. A search for \"tape\" can show only packing tape, even though \"tape\" also appears in the descriptions of tape dispensers.",[366,1356,1357],{},"Filters from several rules all apply. Two rules that show only different brands leave no results.",[1036,1359,1362,1366,1369,1413],{"name":1360,"type":1039,"values":1361},"fieldWeights","weights 0 to 100",[507,1363,1365],{"id":1364},"search-fields-differently","Search fields differently",[342,1367,1368],{},"Gives a field more or less say in the ranking, or stops searching it, for these searches only. A weight replaces the profile's weight for that field. 0 means the field is not searched. In the editor, leave a field empty to keep the profile's weight.",[877,1370,1372],{"className":1054,"code":1371,"language":1056,"meta":882,"style":882},"{ \"type\": \"fieldWeights\", \"weights\": { \"sku\": 10, \"description\": 0 } }\n",[764,1373,1374],{"__ignoreMap":882},[886,1375,1376,1378,1380,1382,1385,1387,1390,1392,1395,1397,1400,1402,1405,1407,1410],{"class":888,"line":889},[886,1377,1063],{"class":892},[886,1379,1067],{"class":1066},[886,1381,1070],{"class":892},[886,1383,1384],{"class":903},"\"fieldWeights\"",[886,1386,646],{"class":892},[886,1388,1389],{"class":1066},"\"weights\"",[886,1391,1265],{"class":892},[886,1393,1394],{"class":1066},"\"sku\"",[886,1396,1070],{"class":892},[886,1398,1399],{"class":946},"10",[886,1401,646],{"class":892},[886,1403,1404],{"class":1066},"\"description\"",[886,1406,1070],{"class":892},[886,1408,1409],{"class":946},"0",[886,1411,1412],{"class":892}," } }\n",[1102,1414,1415],{"v-slot:tips":882},[363,1416,1417,1420,1423],{},[366,1418,1419],{},"Useful when one word means two things: a search for \"kraft\" can weigh the material field up and the description down.",[366,1421,1422],{},"When two rules set a weight for the same field, the higher rule in the list wins.",[366,1424,1425],{},"Weights that would leave no field to search are ignored, and the profile's weights apply.",[337,1427,477],{"id":1428},"when-it-runs",[507,1430,1432],{"id":1431},"schedule","Schedule",[342,1434,1435,450,1438,1441,1442,1445,1446,1449,1450,1453],{},[351,1436,1437],{},"Always",[351,1439,1440],{},"Between two dates",". A rule with dates is live from ",[764,1443,1444],{},"activeFrom",", included, until ",[764,1447,1448],{},"activeUntil",", not included. Leave one empty for no start or no end. The cabinet shows the times in your time zone; the API takes and returns ISO dates with a time zone, such as ",[764,1451,1452],{},"2026-11-20T00:00:00Z",". The end must be after the start.",[507,1455,1457],{"id":1456},"profiles","Profiles",[342,1459,1460,1463,1464,1467],{},[351,1461,1462],{},"All profiles"," (the default) or ",[351,1465,1466],{},"Chosen profiles",". A rule limited to chosen profiles fires only for searches through those profiles. Deleting a profile removes it from every rule. A rule that is left with no profile is switched off, so that it does not start firing on every profile.",[507,1469,1471],{"id":1470},"skip-the-rules-below","Skip the rules below",[342,1473,1474,1475,1478,1479,1482],{},"With ",[351,1476,1477],{},"Skip the rules below when this one applies"," (",[764,1480,1481],{},"stop","), a firing rule ends the run. Rules lower in the list do not fire for that search.",[507,1484,664],{"id":1485},"order",[342,1487,1488,1489,1491,1492,656,1494,1496,1497,1499,1500,1502],{},"Rules run from the top of the list to the bottom. On the ",[351,1490,403],{}," page, drag a rule, or use ",[351,1493,652],{},[351,1495,655],{}," in its row menu (",[351,1498,641],{},"). Clear the list's search and status filter to change the order. Order matters for three things: the order in which pins from several rules appear, which rule's field weight wins, and where a ",[764,1501,1481],{}," rule ends the run.",[337,1504,326],{"id":629},[342,1506,1507],{},"Each rule shows one status:",[516,1509,1510,1524],{},[519,1511,1512],{},[522,1513,1514,1516,1521],{},[525,1515,326],{},[525,1517,1518],{},[764,1519,1520],{},"ruleStatus",[525,1522,1523],{},"Meaning",[532,1525,1526,1539,1552,1565,1578],{},[522,1527,1528,1531,1536],{},[537,1529,1530],{},"Live",[537,1532,1533],{},[764,1534,1535],{},"live",[537,1537,1538],{},"On, and firing for matching searches.",[522,1540,1541,1544,1549],{},[537,1542,1543],{},"Scheduled",[537,1545,1546],{},[764,1547,1548],{},"scheduled",[537,1550,1551],{},"On, and its start date is still ahead.",[522,1553,1554,1557,1562],{},[537,1555,1556],{},"Ended",[537,1558,1559],{},[764,1560,1561],{},"ended",[537,1563,1564],{},"On, but its end date has passed.",[522,1566,1567,1570,1575],{},[537,1568,1569],{},"Off",[537,1571,1572],{},[764,1573,1574],{},"off",[537,1576,1577],{},"Switched off.",[522,1579,1580,1583,1588],{},[537,1581,1582],{},"Needs attention",[537,1584,1585],{},[764,1586,1587],{},"attention",[537,1589,1590],{},"On, but a field it uses no longer fits the mapping. Search skips the rule until you fix it.",[342,1592,1593,1594,1597,1598,1600,1601,1604],{},"A rule needs attention when the mapping changed after it was saved. For example, a boost filters on ",[764,1595,1596],{},"brand",", and ",[764,1599,1596],{}," is no longer filterable or facetable. The rule's ",[764,1602,1603],{},"issues"," list says which field and why.",[337,1606,1608],{"id":1607},"preview-and-test","Preview and test",[342,1610,671,1611,1613,1614,1617,1618,1621,1622,646,1625,646,1628,450,1631,1634],{},[351,1612,488],{}," runs a search through a profile you pick, with the draft rule, before you save it. Pick the ",[351,1615,1616],{},"Search profile"," and type under ",[351,1619,1620],{},"Search for",". The preview shows the results with the rule and marks how each product moved compared with today's results: ",[351,1623,1624],{},"Pinned 1",[351,1626,1627],{},"↑ 3",[351,1629,1630],{},"↓ 2",[351,1632,1633],{},"New",". It also names other rules that fire for the same search. Until the rule is complete, it shows today's results.",[342,1636,1637,1638,1640,1641,1643,1644,1648],{},"To check saved rules, type a search under ",[351,1639,634],{}," on the ",[351,1642,403],{}," page. It lists the rules that apply, and highlights them in the list. The ",[370,1645,1647],{"href":1646},"\u002Fdocs\u002Fsearch\u002Fsearch-api#try-it-in-the-playground","playground"," shows the final results, with pinned products marked.",[342,1650,1651],{},"With the API, test a rule like this:",[1653,1654],"api-route",{"auth":1655,"method":1656,"path":1657},"Project member or any secret key","POST","\u002Fv1\u002Fprojects\u002F:projectId\u002Findices\u002F:indexId\u002Frules\u002Ftest",[342,1659,1660,1661,1664,1665,1070,1668,1671,1672,1675,1676,1679,1680,1683],{},"The body is a search request plus ",[764,1662,1663],{},"profileId"," (the stored profile to search through) and an optional ",[764,1666,1667],{},"draft",[764,1669,1670],{},"{\"id\": \u003Crule id or none>, \"rule\": \u003Crule>}",". The draft takes the place of the stored rule with that id, or runs last when it has no id. The answer has ",[764,1673,1674],{},"fired"," (the rules that fired, in order), ",[764,1677,1678],{},"results",", and with a draft also ",[764,1681,1682],{},"baseline",", the same search without the draft. Tests are not counted in Analytics.",[877,1685,1689],{"className":1686,"code":1687,"language":1688,"meta":882,"style":882},"language-bash shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","curl -X POST https:\u002F\u002Fapi.search.zaproo.cloud\u002Fv1\u002Fprojects\u002F$PROJECT_ID\u002Findices\u002F$INDEX_ID\u002Frules\u002Ftest \\\n  -H \"Authorization: Bearer $ZS_KEY\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"profileId\": \"'$PROFILE_ID'\", \"q\": \"tape\",\n       \"draft\": {\"rule\": {\"name\": \"Tape rolls first\", \"when\": {\"queries\": [\"tape\"]},\n                          \"then\": [{\"type\": \"pin\", \"ids\": [\"tape-48\", \"tape-50\"]}]}}}'\n","bash",[764,1690,1691,1721,1743,1757,1762],{"__ignoreMap":882},[886,1692,1693,1697,1700,1703,1706,1709,1712,1715,1718],{"class":888,"line":889},[886,1694,1696],{"class":1695},"szw1H","curl",[886,1698,1699],{"class":946}," -X",[886,1701,1702],{"class":903}," POST",[886,1704,1705],{"class":903}," https:\u002F\u002Fapi.search.zaproo.cloud\u002Fv1\u002Fprojects\u002F",[886,1707,1708],{"class":892},"$PROJECT_ID",[886,1710,1711],{"class":903},"\u002Findices\u002F",[886,1713,1714],{"class":892},"$INDEX_ID",[886,1716,1717],{"class":903},"\u002Frules\u002Ftest",[886,1719,1720],{"class":909}," \\\n",[886,1722,1723,1726,1729,1732,1735,1738,1741],{"class":888,"line":922},[886,1724,1725],{"class":946},"  -H",[886,1727,1728],{"class":903}," \"Authorization: Bearer ",[886,1730,1731],{"class":892},"$ZS_KEY",[886,1733,1734],{"class":903},"\"",[886,1736,1737],{"class":946}," -H",[886,1739,1740],{"class":903}," \"Content-Type: application\u002Fjson\"",[886,1742,1720],{"class":909},[886,1744,1745,1748,1751,1754],{"class":888,"line":937},[886,1746,1747],{"class":946},"  -d",[886,1749,1750],{"class":903}," '{\"profileId\": \"'",[886,1752,1753],{"class":892},"$PROFILE_ID",[886,1755,1756],{"class":903},"'\", \"q\": \"tape\",\n",[886,1758,1759],{"class":888,"line":974},[886,1760,1761],{"class":903},"       \"draft\": {\"rule\": {\"name\": \"Tape rolls first\", \"when\": {\"queries\": [\"tape\"]},\n",[886,1763,1764],{"class":888,"line":983},[886,1765,1766],{"class":903},"                          \"then\": [{\"type\": \"pin\", \"ids\": [\"tape-48\", \"tape-50\"]}]}}}'\n",[337,1768,1112],{"id":1769},"pins-sorting-and-facets",[342,1771,1772],{},"Pins apply only when results are ordered by relevance:",[363,1774,1775,1789,1811],{},[366,1776,1777,1780,1781,1784,1785,1788],{},[351,1778,1779],{},"The shopper sorts by a field."," A sort such as ",[764,1782,1783],{},"price:asc"," puts relevance aside, and pins with it. A pinned product shows only if it matches the search, in its place in the price order, and carries no ",[764,1786,1787],{},"_pinned"," flag.",[366,1790,1791,1794,1795,1799,1800,1802,1803,1806,1807,1810],{},[351,1792,1793],{},"The profile has always-show-first clauses."," Pins apply when, after the profile's ",[370,1796,1798],{"href":1797},"\u002Fdocs\u002Fsearch\u002Fprofiles#always-show-first","pinnedSort"," clauses, the order is by relevance. With ",[764,1801,1798],{}," set to ",[764,1804,1805],{},"inStock:desc"," and the default sort ",[764,1808,1809],{},"_relevance",", pins lead within each group. A pinned product that is out of stock comes after every product in stock.",[366,1812,1813,1816],{},[351,1814,1815],{},"The shopper clicks a facet."," Pins pass through the same filters as every other product. A click on another brand removes a pinned product of a different brand from the results.",[342,1818,1819],{},"Pinned products count in the facets like any other result.",[337,1821,1823],{"id":1822},"how-several-rules-combine","How several rules combine",[342,1825,1826],{},"Every rule that fires adds its actions:",[363,1828,1829,1832,1835,1838,1841],{},[366,1830,1831],{},"Pins join in rule order, without duplicates, up to 24 in total.",[366,1833,1834],{},"Hidden products add up, and a hidden product is never pinned.",[366,1836,1837],{},"Boosts multiply for a product that matches several, up to 100 times in total.",[366,1839,1840],{},"Filters all apply.",[366,1842,1843],{},"For each field, the weight from the highest firing rule wins.",[337,1845,315],{"id":1846},"limits",[516,1848,1849,1859],{},[519,1850,1851],{},[522,1852,1853,1856],{},[525,1854,1855],{},"What",[525,1857,1858],{},"Limit",[532,1860,1861,1873,1881,1888,1896,1904,1912,1920,1928],{},[522,1862,1863,1866],{},[537,1864,1865],{},"Rules per index",[537,1867,1868,1869,1872],{},"1,000 (",[764,1870,1871],{},"409 RULE_LIMIT_REACHED"," above)",[522,1874,1875,1878],{},[537,1876,1877],{},"Phrases per rule",[537,1879,1880],{},"100, each 1 to 200 characters",[522,1882,1883,1886],{},[537,1884,1885],{},"Actions per rule",[537,1887,1399],{},[522,1889,1890,1893],{},[537,1891,1892],{},"Pinned products per action, and per search",[537,1894,1895],{},"24",[522,1897,1898,1901],{},[537,1899,1900],{},"Hidden products per action",[537,1902,1903],{},"500",[522,1905,1906,1909],{},[537,1907,1908],{},"Boost factor",[537,1910,1911],{},"0.1 to 10",[522,1913,1914,1917],{},[537,1915,1916],{},"Field weight",[537,1918,1919],{},"0 to 100",[522,1921,1922,1925],{},[537,1923,1924],{},"Profiles per rule",[537,1926,1927],{},"50",[522,1929,1930,1933],{},[537,1931,1932],{},"Rule name",[537,1934,1935],{},"1 to 100 characters",[337,1937,1939],{"id":1938},"over-the-api-and-mcp","Over the API and MCP",[342,1941,1942],{},"The cabinet uses these routes. Call them, or ask an AI agent, to manage rules from a script.",[1653,1944],{"auth":1655,"method":1945,"path":1946},"GET","\u002Fv1\u002Fprojects\u002F:projectId\u002Findices\u002F:indexId\u002Frules",[1653,1948],{"auth":1949,"method":1656,"path":1946},"Project admin or a full-access secret key",[1653,1951],{"auth":1655,"method":1945,"path":1952},"\u002Fv1\u002Fprojects\u002F:projectId\u002Findices\u002F:indexId\u002Frules\u002F:ruleId",[1653,1954],{"auth":1949,"method":1955,"path":1952},"PUT",[1653,1957],{"auth":1949,"method":1958,"path":1952},"DELETE",[1653,1960],{"auth":1949,"method":1955,"path":1961},"\u002Fv1\u002Fprojects\u002F:projectId\u002Findices\u002F:indexId\u002Frules\u002Forder",[342,1963,1964,1966,1967,1969,1970,1973,1974,1977,1978,1981,1982,1985],{},[764,1965,1656],{}," adds the rule at the bottom of the list. ",[764,1968,1955],{}," replaces the whole rule. ",[764,1971,1972],{},"PUT ...\u002Forder"," takes ",[764,1975,1976],{},"{\"ids\": [...]}"," with every rule id of the index exactly once, in the new order, or answers ",[764,1979,1980],{},"400 RULE_ORDER_MISMATCH",". A rule that names a field the mapping does not allow for its use, or a profile of another index, answers ",[764,1983,1984],{},"400 RULE_INVALID"," with one issue per problem.",[1987,1988,1989,2076],"tabs",{},[1990,1991,1993],"tabs-item",{"icon":1992,"label":1696},"i-lucide-terminal",[877,1994,1996],{"className":1686,"code":1995,"language":1688,"meta":882,"style":882},"curl -X POST https:\u002F\u002Fapi.search.zaproo.cloud\u002Fv1\u002Fprojects\u002F$PROJECT_ID\u002Findices\u002F$INDEX_ID\u002Frules \\\n  -H \"Authorization: Bearer $ZS_KEY\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Christmas sale: Boxwell\",\n    \"when\": {\"queries\": []},\n    \"then\": [{\"type\": \"boost\", \"filters\": {\"brand\": \"Boxwell\"}, \"factor\": 2}],\n    \"activeFrom\": \"2026-11-01T00:00:00Z\",\n    \"activeUntil\": \"2026-11-15T00:00:00Z\"\n  }'\n",[764,1997,1998,2019,2035,2042,2047,2052,2058,2064,2070],{"__ignoreMap":882},[886,1999,2000,2002,2004,2006,2008,2010,2012,2014,2017],{"class":888,"line":889},[886,2001,1696],{"class":1695},[886,2003,1699],{"class":946},[886,2005,1702],{"class":903},[886,2007,1705],{"class":903},[886,2009,1708],{"class":892},[886,2011,1711],{"class":903},[886,2013,1714],{"class":892},[886,2015,2016],{"class":903},"\u002Frules",[886,2018,1720],{"class":909},[886,2020,2021,2023,2025,2027,2029,2031,2033],{"class":888,"line":922},[886,2022,1725],{"class":946},[886,2024,1728],{"class":903},[886,2026,1731],{"class":892},[886,2028,1734],{"class":903},[886,2030,1737],{"class":946},[886,2032,1740],{"class":903},[886,2034,1720],{"class":909},[886,2036,2037,2039],{"class":888,"line":937},[886,2038,1747],{"class":946},[886,2040,2041],{"class":903}," '{\n",[886,2043,2044],{"class":888,"line":974},[886,2045,2046],{"class":903},"    \"name\": \"Christmas sale: Boxwell\",\n",[886,2048,2049],{"class":888,"line":983},[886,2050,2051],{"class":903},"    \"when\": {\"queries\": []},\n",[886,2053,2055],{"class":888,"line":2054},6,[886,2056,2057],{"class":903},"    \"then\": [{\"type\": \"boost\", \"filters\": {\"brand\": \"Boxwell\"}, \"factor\": 2}],\n",[886,2059,2061],{"class":888,"line":2060},7,[886,2062,2063],{"class":903},"    \"activeFrom\": \"2026-11-01T00:00:00Z\",\n",[886,2065,2067],{"class":888,"line":2066},8,[886,2068,2069],{"class":903},"    \"activeUntil\": \"2026-11-15T00:00:00Z\"\n",[886,2071,2073],{"class":888,"line":2072},9,[886,2074,2075],{"class":903},"  }'\n",[1990,2077,2079,2087],{"icon":279,"label":2078},"MCP",[877,2080,2085],{"className":2081,"code":2083,"language":2084,"meta":882},[2082],"language-text","On the products index, when someone searches exactly \"tape\", put tape-48\nand tape-50 first. Test it on the Storefront profile before saving.\n","text",[764,2086,2083],{"__ignoreMap":882},[342,2088,2089,2090,2093,2094,416,2097,646,2100,656,2103,2106],{},"The agent calls ",[764,2091,2092],{},"test_rule"," and then ",[764,2095,2096],{},"upsert_rule",[764,2098,2099],{},"list_rules",[764,2101,2102],{},"delete_rule",[764,2104,2105],{},"reorder_rules"," cover the rest.",[342,2108,2109,2110,646,2113,1478,2116,2119,2120,1478,2122,2125,2126,2128,2129,1478,2132,2119,2134,1478,2136,2139,2140,1478,2143,2119,2146,656,2148,1478,2150,2119,2153,1597,2155,1478,2157,2160,2161,646,2164,2167,2168,408],{},"The fields of a rule, with their defaults: ",[764,2111,2112],{},"name",[764,2114,2115],{},"enabled",[764,2117,2118],{},"true","), ",[764,2121,1456],{},[764,2123,2124],{},"[]",", every profile), ",[764,2127,353],{}," with ",[764,2130,2131],{},"queries",[764,2133,2124],{},[764,2135,742],{},[764,2137,2138],{},"\"is\"",") and ",[764,2141,2142],{},"filters",[764,2144,2145],{},"{}",[764,2147,1444],{},[764,2149,1448],{},[764,2151,2152],{},"null",[764,2154,357],{},[764,2156,1481],{},[764,2158,2159],{},"false","). A stored rule also has ",[764,2162,2163],{},"id",[764,2165,2166],{},"position"," (0 runs first) and ",[764,2169,1603],{},[337,2171,2173],{"id":2172},"common-mistakes","Common mistakes",[363,2175,2176,2185,2197,2206,2216],{},[366,2177,2178,2181,2182,2184],{},[351,2179,2180],{},"A pin does not show."," The shopper sorted by a field, the pinned product fails a filter, or another rule hides it. Type the search under ",[351,2183,634],{}," to see which rules fire.",[366,2186,2187,2190,2191,2193,2194,2196],{},[351,2188,2189],{},"A rule fires too often."," ",[764,2192,800],{}," with a short phrase fires on every search with that word. Use ",[764,2195,783],{}," for one-word searches you want to steer.",[366,2198,2199,2202,2203,408],{},[351,2200,2201],{},"A rule never fires on a category page."," Its filtered-page condition uses another form than the storefront sends, such as a list where the storefront sends ",[764,2204,2205],{},"{\"terms\": [...]}",[366,2207,2208,2211,2212,2215],{},[351,2209,2210],{},"The search box opens empty although an empty-search rule is live."," The storefront sends no search on focus, or sends one with a filter. Send a search with an empty ",[764,2213,2214],{},"q"," and no filters when the box gets focus.",[366,2217,2218,2221,2222,2224],{},[351,2219,2220],{},"A campaign does not end."," It has no end date. Set ",[351,2223,1440],{},", or switch it off when the campaign is over.",[337,2226,2228],{"id":2227},"related","Related",[363,2230,2231,2236,2241,2247],{},[366,2232,2233,2235],{},[370,2234,212],{"href":213},": settings that hold for every search.",[366,2237,2238,2240],{},[370,2239,224],{"href":225},": rules fire for synonyms of their phrases.",[366,2242,2243,2246],{},[370,2244,206],{"href":2245},"\u002Fdocs\u002Fsearch\u002Fsearch-api#explaining-scores",": see which rule moved a product.",[366,2248,2249,2252],{},[370,2250,265],{"href":2251},"\u002Fdocs\u002Fanalytics\u002Freports#ranking-rules",": how each rule performs.",[2254,2255,2256],"style",{},"html pre.shiki code .s7iLA, html code.shiki .s7iLA{--shiki-light:#0E1116;--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html pre.shiki code .s6m-Y, html code.shiki .s6m-Y{--shiki-light:#622CBC;--shiki-default:#622CBC;--shiki-dark:#DBB7FF}html pre.shiki code .semJd, html code.shiki .semJd{--shiki-light:#032563;--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .sklAV, html code.shiki .sklAV{--shiki-light:#A0111F;--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .ssYy9, html code.shiki .ssYy9{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#91CBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sb7M8, html code.shiki .sb7M8{--shiki-light:#024C1A;--shiki-default:#024C1A;--shiki-dark:#72F088}html pre.shiki code .szw1H, html code.shiki .szw1H{--shiki-light:#702C00;--shiki-default:#702C00;--shiki-dark:#FFB757}",{"title":882,"searchDepth":922,"depth":922,"links":2258},[2259,2260,2264,2271,2278,2284,2285,2286,2287,2288,2289,2290,2291],{"id":339,"depth":922,"text":340},{"id":385,"depth":922,"text":386,"children":2261},[2262,2263],{"id":415,"depth":937,"text":509},{"id":603,"depth":937,"text":604},{"id":668,"depth":922,"text":458,"children":2265},[2266,2267,2268,2269,2270],{"id":715,"depth":937,"text":441},{"id":742,"depth":937,"text":445},{"id":845,"depth":937,"text":449},{"id":857,"depth":937,"text":453},{"id":1001,"depth":937,"text":1002},{"id":1026,"depth":922,"text":472,"children":2272},[2273,2274,2275,2276,2277],{"id":1043,"depth":937,"text":1044},{"id":1132,"depth":937,"text":1125},{"id":1176,"depth":937,"text":1177},{"id":1305,"depth":937,"text":1306},{"id":1364,"depth":937,"text":1365},{"id":1428,"depth":922,"text":477,"children":2279},[2280,2281,2282,2283],{"id":1431,"depth":937,"text":1432},{"id":1456,"depth":937,"text":1457},{"id":1470,"depth":937,"text":1471},{"id":1485,"depth":937,"text":664},{"id":629,"depth":922,"text":326},{"id":1607,"depth":922,"text":1608},{"id":1769,"depth":922,"text":1112},{"id":1822,"depth":922,"text":1823},{"id":1846,"depth":922,"text":315},{"id":1938,"depth":922,"text":1939},{"id":2172,"depth":922,"text":2173},{"id":2227,"depth":922,"text":2228},"md",{},{"icon":234},{"title":230,"description":233},"DQy9W3uaZQuNTkWQLZBqudkRneZjJHiXlZ5jOqMM6fk",[2298,2299],{"title":224,"path":225,"stem":226,"description":227,"icon":228,"children":-1},{"title":236,"path":237,"stem":238,"description":239,"icon":240,"children":-1},1793717706321]