---
title: "Facet interface"
slug: "the-facet-interface"
abstract: "Sitecore Searchからのfacetsに基づいてキーワードフレーズの結果を絞り込むリクエストのFacet interfaceを説明します。"
---
# Facet interface

Sitecore Searchでは、コンテンツをfacetsで表示することができます。ファセットは、属性値に基づいてカテゴリを作成する動的な検索インターフェースコンポーネントです。facetsを使えば、ユーザーはカテゴリを使って検索結果を簡単に絞り込むことができます。

## Facet interface

名称

種類

概要

all

ブール値

あらゆる側面タイプにリクエストがあります。

max

番号

ファセットタイプは最大数です。

sort

ファセットソート

仕分け順をリクエストします。

types

アレイ

ファセットの種類一覧。

## FacetSort interface

名称

種類

概要

name

ストリング

アルファベット順か数字順にソートするタイプ。  
  
*テキスト* か *数え*て。

order

ストリング

昇順か降順のどちらか。  
  
*ASC* か *DESC*。

## FacetType interface

名称

種類

概要

after

ストリング

リストの前のファセットタイプの名前...

exclude

アレイ

除外すべき面の種類の名前。

filter

FacetTypeFilter

FacetTypeFilterOr または FacetTypeFilterAnd

filtering\_options

アレイ

FacetTypeFilteringOptionsの列挙値の一覧。  
  
FacetTypeFilteringOptions.HARD\_FILTERS、 FacetTypeFilteringOptions.OTHER\_FACET\_VALUES、および FacetTypeFilteringOptions.OWN\_VALUES

keyphrase

ストリング

検索のためのフレーズ。

max

番号

復活できるファセットタイプの最大数。

min\_count

番号

返すべきファセットタイプは最低限です。

name

ストリング

ファセットタイプの名前。

sort

アレイ

ファセットタイプのソートオプション一覧。

## Sort interface

名称

種類

概要

choices

ブール値

フラグを立てて、レスポンスであらゆる並び替えオプションのリストをリクエストしてください。  
  
*真か**偽か*

value

ソートアイテム

Objectはアイテムのソート方法を記述します。

## SortItem interface

名称

種類

概要

name

ストリング

アルファベット順か数字順にソートするタイプ。  
  
*テキスト* か *数え*て。

order

ストリング

昇順か降順のどちらか。  
  
*ASC* か *DESC*。

> !注特に明記がない限り、すべての値は任意です。

## Other related methods

以下のコードブロックは、facetsに関連するさまざまなメソッドを一覧にしており、WidgetRequestオブジェクトを通じてアクセス可能です。JS Dataパッケージをプロジェクトにインストールした後、これらのメソッドとそのドキュメントはIDE上で利用可能です。

/\*\* search.facet \*/
getSearchFacet(): Facet;
setSearchFacet(value: Facet): IWidgetItem;
resetSearchFacet(): IWidgetItem;
updateSearchFacet(value: Facet): IWidgetItem;

/\*\* search.facet.all \*/
getSearchFacetAll(): boolean;
setSearchFacetAll(value: boolean): IWidgetItem;
resetSearchFacetAll(): IWidgetItem;

/\*\* search.facet.max \*/
getSearchFacetMax(): number;
setSearchFacetMax(value: number): IWidgetItem;
resetSearchFacetMax(): IWidgetItem;

/\*\* search.facet.sort \*/
getSearchFacetSort(): FacetSort;
setSearchFacetSort(value: FacetSort): IWidgetItem;
resetSearchFacetSort(): IWidgetItem;
updateSearchFacetSort(value: FacetSort): IWidgetItem;

/\*\* search.facet.sort.name \*/
getSearchFacetSortName(): string;
setSearchFacetSortName(value: string): IWidgetItem;
resetSearchFacetSortName(): IWidgetItem;

/\*\* search.facet.sort.order \*/
getSearchFacetSortOrder(): string;
setSearchFacetSortOrder(value: string): IWidgetItem;
resetSearchFacetSortOrder(): IWidgetItem;

/\*\* search.facet.types \*/
getSearchFacetTypes(): Array<FacetType>;
setSearchFacetTypes(value: Array<FacetType>): IWidgetItem;
resetSearchFacetTypes(): IWidgetItem;
addSearchFacetType(value: FacetType): IWidgetItem;
removeSearchFacetType(value: FacetType, filter?: (v: any) => boolean): IWidgetItem;