---
title: Filter and search within results
slug: configured-commerce/docs/filter-and-search-within-results
docTags: 
createdAt: 2026-08-13T10:46:26.000Z
---

You can filter an existing search query to refine the results based on various search terms and/or product attributes, such as by **Categories** and **Price**. The filters display dynamically based on the attributes and attribute type setting of the products found in the original search query. 

This article covers the following topics:

- [Search within results](docId\:xi5KMoEvrAUeYXbspkBvg)
- [Filter search results by attributes](docId\:xi5KMoEvrAUeYXbspkBvg)
- [Filter search results by previously purchased products](docId\:xi5KMoEvrAUeYXbspkBvg)
- [Filter search results by stocked items only products](docId\:xi5KMoEvrAUeYXbspkBvg)
- [Share filtered search results](docId\:xi5KMoEvrAUeYXbspkBvg)
- [Enable product comparisons](docId\:xi5KMoEvrAUeYXbspkBvg)
- [Compare products](docId\:xi5KMoEvrAUeYXbspkBvg)

## Search within results

1. Enter additional keywords in the **Search Within Results** or **Search Within Categories** fields.
2. Click the **Search** icon to filter results by the additional keywords.

## Filter search results by attributes

1. Select one or more of the check boxes under **Filters** to refine the search results by specific attribute values.
2. The search results automatically update based on your selections.

## Filter search results by previously purchased products

You must set the **Enable Boosting by Purchase History** toggle to **YES** before the **Allow Purchase History Filtering** setting shows. Guest users cannot see this setting.

1. Go to **Administration > System > Settings** and enable **Allow Filtering for Previously Purchased Products**. This adds a Previously Purchased option below the Search Within Results or Search Within Category sections on the results or category list pages.
2. Select the **Previously Purchased** check box to filter the search results or category list to show only products that the customer bill-to has purchased before based on the order data in the order history table from order line frequency.

## Filter search results by stocked items only products

You must first set products as stocked. You can do this manually on the product record by setting the **Is Stocked** toggle to **ON** in the Details tab. You can also use the product import template and set the **IsStocked** field to true, located under the Selling Rules section.

1. Go to **Administration > System > Settings** and enable **Display Facets for StockedItems**. This adds a Stocked Items Only option which customers can use to select items set as normally stocked in warehouses. 
2. Select the **Stocked Items Only** check box to filter the search results or category list to show only products that are stocked (or where the IsStocked field is set to true on the product record).

The **Is Stocked** toggle differentiates local warehouse products from drop-ship products, regardless of inventory.

## Share filtered search results

If you want the ability to share filtered search results, you need to update your theme to have the **getQueryStringValues** and **updateSearchQuery** functions in the **insite.product-list.controller.ts** file.

1. Copy the URL after applying facets to a product list (either search results or a category product list) to share filtered search results. The URL updates to include the selected facets.
2. Share the URL and/or save and return to it to see the filtered list of products.

From a product list or search results page, you can compare multiple products side by side.

:::hint{type="info"}
**Note**

There is a hard-coded default limit of six for the number of products customers can compare at one time.
:::

## Enable product comparisons

1. Go to **Administration > System > Settings.**
2. Search for **Product Comparisons**.
3. Set the **Product Comparisons** toggle to **ON** to enable the feature on the product list.
4. Click **Save**.

## Compare products

1. Select a category or search for a product to view a product list page.
2. Select the **Compare** check box next to the products you want to compare side by side, up to six.
3. Review the selected products. Click the **Remove** icon next to a product to remove it from the comparison. If you compare more than four products, click the left or right arrows to view and compare the additional products in the carousel.
4. Click **Remove All** to cancel the product comparison and return to the product list view.
5. Click **Return to previous page** to return to the product list view with the products still selected for comparison.
6. Click **Clear All** to cancel the product comparison from here, or select further products and click **Compare** to view them side by side.
