How to upgrade the search integration (search-widgets or sdk-react)
You may find that you need to update the search integration code used to build the search interface in your website or app. The most common reason for this is to gain access to new features. When safe, we strive to push new features to clients without requiring an update. However, to avoid unexpected changes of behaviour in your search integration, larger updates might require a manual upgrade of the library. This also gives you an opportunity to test the new capabilities before going live on your site.
Getting started
The first step in updating is to determine which integration method your app uses. If you are a Shopify customer or if you installed your search integration by following our in-app “Search Interface” install guide, please follow the instructions below — Search Widgets. If your website or app uses a custom integration built on the React SDK, please follow the instructions under SDK-React.
If your website or app uses a custom search client built on one of our other language specific API client libraries, the upgrade steps will be specific to that platform’s standards. Please find the readme specific to your client library.
Search Widgets
If you are using the Shopify integration or performed the installation instructions provided by the Search Interface designer, there is no need to upgrade your search integration code at this time. All updates to this integration method are automated for you.
SDK-React
SDK-React is made up of several different packages. You’ll need to determine which of the packages is used in your custom search integration. Looking at the source code of your integration, the package name will be similar to @search.io/{packageName}
.
The standard javascript project toolchain makes upgrading any of these packages simple. Our suggestion is to update to the latest version of the package by one of the following commands:
Yarn
yarn upgrade -L @search.io/{packageName}
NPM:
*Note that you may need to make changes to your package json in order to ignore semver restrictions.
npm update @search.io/{packageName}
As a general rule when upgrading a package, we suggest you update all @search.io/*
packages that your project uses.