On February 14, 2027, every store will move to Version 5, and the compatibility layer will be removed. Any custom storefront code that still calls Version 4 APIs will stop working that date.
We recommend testing your theme with the new search client before switching your store over by using a URL that only affects your session.
SET UP THE PREVIEW
Add this to your theme.
In your thee editor, openAssetsand createalgolia_custom_hooks.jsif you don't already have it. Paste in:
document.addEventListener('algolia.hooks.initialize', function () { var forced = new URLSearchParams(window.location.search).get('algolia_search_client'); if (forced) sessionStorage.setItem('algolia_search_client', forced); if (forced === '') sessionStorage.removeItem('algolia_search_client'); var preview = sessionStorage.getItem('algolia_search_client'); if (preview) window.algoliaShopify.config.app_block_search_client_version = preview; });
If the file is new, load it fromtheme.liquidjust before</body>.
2. Open your storefront with the preview turned on.
Add
?algolia_search_client=v5to any storefront URL, for exampleyour-store.com/search?q=shirt&algolia_search_client=v5.3. Try everything your shoppers do
Search, filters, sorting, collection pages, product pages and recommendation rows.The preview follows the rest of that browsing session, so you only need the URL once. Anything that breaks is custom theme code calling Version 4 APIs.
Only your browser tab is previewing. Shoppers keep seeing whatever version your store
is set to, so you can take as long as you need.
Preview Options
| ADD TO THE URL | WHAT YOU SEE |
palgolia_search_client=v5 | Version 5, the version every store ends up on |
?algolia_search_client=v5_shim | Version 5 with the compatibility layer, which translates most Version 4 code |
?algolia_ search_client=v4 | Version 4, to compare against |
aldolla search client= | Preview off, back to your store's setting |
CONFIRM WHICH VERSION IS RUNNING
Open your browser console on a search page and run:
window.algoliaShopify.searchClient.transporter.algoliaAgent.value
A result containing (5. means Version 5 is running. undefined means Version 4.
To tell plain Version 5 apart from the compatibility layer, run typeof window.algoliaShopify.searchClient.initIndex--it reports undefined on plain
Version 5 and function when the compatibility layer is active.
WHEN YOU'RE READY
Set Version 5 on the App Block Search client version card in Search options, confirm it with the console check above, then delete the snippet. You can move back and
forth between versions at any time before February 14, 2027.
- The preview doesn't change anything
Your theme may be loading an older version of the Algolia app blocks, which always runs Version 4. Contact support and we'll check the version your store is serving
- The storefront doesn't match the version I selected
Go to Search options, scroll to Synchronize Settings and press Sync Settings. That pushes your current settings to your theme. Then re-run the console check.
If you have any further questions about a specific error in your theme? Please contact the Algolia Support team along with the console message and the page it happened on.