> For the complete documentation index, see [llms.txt](https://manual.dxable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.dxable.com/optimizely/configured-commerce/optimizely-configured-commerce/search/filter-and-search-within-results.md).

# 結果内でフィルタリングと検索

既存の検索クエリをフィルタリングして、さまざまな検索用語や製品属性に基づいて結果を絞り込むことができます。 一般的な検索フィルターの例としては、**\[Categories]**&#x3084;**\[Price]**&#x306A;どがあります。 フィルターは、元の検索クエリで見つかった製品の属性と属性タイプの設定に基づいて動的に表示されます。

![](/files/AqFJZiqfaEtOPXLapOmD)

### 結果内を検索 <a href="#gjdgxs" id="gjdgxs"></a>

1. **\[Search Within Results]**&#x307E;た&#x306F;**\[Search Within Categories]**&#x30D5;ィールドに追加のキーワードを入力します。
2. 追加のキーワードで結果をフィルタリングするには、**\[Search]**&#x30A2;イコンをクリックします。

### 属性による検索結果のフィルタリング <a href="#id-30j0zll" id="id-30j0zll"></a>

1. 特定の属性値で検索結果を絞り込むには、「フィルター」の下にあるチェック ボックスを 1 つ以上選択します。
2. 検索結果は選択内容に基づいて自動的に更新されます。

### 以前購入した製品で検索結果をフィルタリングする <a href="#id-1fob9te" id="id-1fob9te"></a>

**\[Enable Boosting by Purchase History]**&#x30C8;グル&#x3092;**\[YES]**&#x306B;設定しないと、**\[Allow Purchase History Filtering]**&#x8A2D;定が表示されません。 この設定はゲストユーザーには表示されません。

1. **Administration > System > Settings**&#x306E;**\[Allow Purchase History Filtering]**&#x8A2D;定を有効にして、検索結果またはカテゴリ リスト ページのSearch Within ResultsまたはSearch Within Categoryセクションの下&#x306B;**\[Previously Purchased]**&#x30D5;ァセットを追加します。 デフォルト値: Yes。
2. **\[Previously Purchased]**&#x30C1;ェックボックスを選択すると、検索結果またはカテゴリーリストをフィルタリングして、注文履歴テーブルの注文データに基づいて、顧客の請求先が以前に購入したことのある商品のみを表示します（数量ではなく、注文行回数に基づいて）。

### 在庫商品のみで検索結果を絞り込む <a href="#id-3znysh7" id="id-3znysh7"></a>

まず商品を在庫ありとして設定する必要があります。 これは、製品レコードで手動で行うことができます ( \[詳細] フィンガー タブ&#x3067;**\[Is Stocked]**&#x30C8;グル&#x3092;**\[ON]**&#x306B;設定します)。 また、製品インポート テンプレートを使用して、**\[IsStocked]**&#x30D5;ィールドを true に設定することもできます (これはテンプレートではオプションであり、緑色の販売ルール セクションの下にあり、「このアイテムがローカル倉庫に定期的に在庫されているかどうか」という説明があります)。 ストアフロントのファセットとして使用できます。")

1. **Administration > System > Settings**&#x306E;**\[Display Facets for StockedItems]**&#x8A2D;定を有効にして、「在庫品目」見出しの下&#x306B;**\[Stocked Items Only]ファセット**を追加します。 有効にすると、顧客は倉庫に通常在庫されているアイテムを選択できるようになります。 デフォルト値: No。
2. **\[Stocked Items Only]** チェックボックスを選択すると、検索結果またはカテゴリ リストをフィルタリングして、在庫のある（または商品レコードの \[IsStocked] フィールドが true に設定されている）商品のみを表示できます。

**\[Is Stocked]**&#x30C8;グルは在庫とは関係ありませんが、在庫に関係なく、ローカル倉庫の製品とドロップシップの製品を区別することを目的としています。

### フィルタリングされた検索結果を共有する <a href="#id-2et92p0" id="id-2et92p0"></a>

フィルタリングされた検索結果を共有する機能が必要な場合は、まず、あなたまたはパートナー開発者がテーマを更新して、**\[insite.product-list.controller.ts]**&#x30D5;ァイルに**getQueryStringValues** 関数と**updateSearchQuery**関数が含まれていることを確認する必要があります。

1. フィルタリングされた検索結果を共有するには、製品リスト (検索結果またはカテゴリ製品リスト) にファセットを適用した後、URL をコピーします。 選択したファセットが含まれるように URL が更新されます。
2. URL を共有するか、保存して戻ってフィルタリングされた製品リストを表示します。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://manual.dxable.com/optimizely/configured-commerce/optimizely-configured-commerce/search/filter-and-search-within-results.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
