The Searchspring live indexing API is not intended to fully replace the Searchspring feed bulk indexing. It is only intended to keep product data up to date between bulk indexing runs. Below is a list of best practices when using live indexing to ensure everything runs smoothly.
Keep Your Feed
We recommend that you do not rely entirely upon the Searchspring live indexing API. You should still be using our feed bulk indexing for a few reasons.
- Your feed is an authoritative source of your product data.
- If something goes wrong with your index we can quickly repair any issues by running a bulk index of your feed.
- You should run a bulk index periodically (we recommend nightly) in case there were any updates to your products that were missed.
Use Our Bulk Indexing API
You must use our bulk indexing API to run your bulk indexing on demand. Once your feed generation has started you should pause your live indexing requests (storing them in a queue). Once the feed generation has completed you should use the API to request a bulk index. Once the bulk index is complete you could run your live indexing requests for product updates that have occurred since your feed was generated. You can find documentation for the Bulk Indexing API here.
Limit Number of Live Indexing Requests
There are many times that a product is updated that an update to Searchspring is not required. You should only send Searchspring a live indexing request when data required by Searchspring is changed. Below are some examples:
- If a product goes from having 22 in stock to 21 in stock this does not generally affect Searchspring if you're not displaying quantity in stock in your results display. You should only send a live indexing update if a product goes in or out of stock.
- If a field is updated that isn't being used for Searchspring display, search, sort or faceting you don't need to send an update.
Remove External Data Requirements
Often Searchspring will fetch data from external sources to build your index data. These include sources like Rating APIs (Yotop, BazaarVoice, etc), Google Analytics and external CSV files. When processing live indexing requests Searchspring is unable to fetch data from these sources. Data currently pulled from these sources would have to be added to your product data feed source and live indexing requests.