Skip to main content
The Algolia AI Search & Discovery app lets you choose if you want to keep or remove out-of-stock products from the search results.

Out-of-stock policies

Out-of-stock product variants are removed from the search results based on filters. Filtering relies on the inventory_quantity and inventory_policy attributes of the product variants resource. A product variant is out-of-stock if the inventory_quantity attribute is 0. The inventory_policy attribute can be allow if you explicitly decided to continue selling a product when it’s out of stock. Otherwise, this attribute is deny.
  • Remove out-of-stock products, except those marked explicitly as available.

Select your out-of-stock policy

To select your policy for handling out-of-stock items in the search results:
  1. In your Shopify admin, open the Algolia AI Search & Discovery app.
  2. On the Search options tab, go to the Additional settings > Out of stock items section. Dialog for handling out-of-stock items in search results in the Algolia AI Search & Discovery app in the Shopify admin
  3. Select your policy for handling out-of-stock items:
    • Show all out of stock items in search results. No filter is applied. All products are included in the search results. This is the default.
    • Hide all out of stock items in search results. Out-of-stock items are removed from search results. A filter inventory_quantity>0 is applied when searching.
    • Hide out of stock items - except those marked as available. Out-of-stock items are removed from search results, except products with the Continue selling when out of stock option. After selecting this option, you might need to reindex your product catalog. A filter inventory_available:true is applied when searching. The inventory_available attribute is true, when the inventory_quantity attribute is greater than 0, or when the inventory_policy attribute is set to allow for that product.

Continue selling out-of-stock products

To select which products are included in the search results when they’re out of stock:
  1. Go to the Products page in your Shopify admin.
  2. Select a product you want to show in the search result when it’s out of stock.
  3. In the Inventory section, select Track quantity and Continue selling when out of stock.
The selected products are now included in the search results, even when they’re out of stock.

UI updates

You can find the Autocomplete and InstantSearch widgets in these files:

Autocomplete updates

In Autocomplete v1, filters are defined in the algolia_autocomplete_product_plugin.js.liquid file:
Javascript
In older versions of the Autocomplete widget, the algolia_autocomplete.js.liquid file includes the following changes:
Javascript

InstantSearch updates

The algolia_instant_search.js.liquid file includes the following changes:
Javascript
Last modified on June 16, 2026