Introduction to Shopify Indexing
To index your data, we call the Shopify API, and use Shopify webhooks.
When you install the app in your store, we automatically start indexing your data.
This is what we call a full reindex. You can trigger a full reindex, for any data type, in the Indexing tab.
The app is designed to automatically keep your data up to date. We’re using Shopify webhooks to know when you make updates to your Shopify catalog and to immediately push the changes.
Blog posts and pages are a special case. Shopify doesn’t provide webhooks for them. To keep your search up to date, we do a full reindex of the articles and pages every day. If you want your search results updated faster, you can trigger a full reindexing from your Indexing tab.
To index your data while keeping your data consistent and respecting Shopify’s rate limiting, we have implemented an indexing queue: all your indexing jobs wait until they can be processed. You can see the number of queued indexing jobs in the Indexing tab of the application.
Whenever you notice that your data is not up to date, you should check the indexing queue. Every data packet that is either waiting to be or is actively being processed is listed here, alongside a progress bar.
When automatic updates are enabled, the app generates various Algolia indexing operations to keep your data in sync. We can infer how many indexing operations will be generated from the type of update received from Shopify:
- Product updates
The number of indexing operations for each product is equal to the number of variants for that product.
For example, if you update 5 products with 4 variants each, the total number of indexing operations will be 20 (5 times 4).
- Collection updates
If you enable collection indexing, the number of indexing operations for each collection is equal to the number of product variants in that collection (if you enable the “Collection Pages” feature or “Enable faceting on collections” option), plus one operation for the collection itself.
For example, if you didn’t enable the “Collection Pages” feature and update 2 collections that have 20 and 30 variants respectively, there are only 2 indexing operation to index the collections themselves.
However, if you did enable the “Collection Pages” feature, the number of indexing operations will be 52: 2 for updating the collections themselves, and 50 for updating their variants.
- Order updates
Each order update generates 1 indexing operation. For example, if the app received 20 order updates, it will generate 20 indexing operations.
When performing a full reindex, similar numbers apply:
- Full product reindex
The number of indexing operations generated is equal to the total number of published variants in the store.
- Full collection reindex
The number of indexing operations is equal to the total number of published collections. If you enable the “Collection Pages” feature or the “Enable faceting on collections” option, we make additional indexing operations equal to the number of variants in those collections.