---
title: "Sitecore。Commerce.Plugin。Search。AbstractIndexFieldHandlerクラス"
slug: "the-sitecore-commerce-plugin-search-abstractindexfieldhandler-class"
abstract: "Sitecore.の詳細な説明。Commerce.Plugin。Search。AbstractIndexFieldHandlerクラス。"
---
# Sitecore。Commerce.Plugin。Search。AbstractIndexFieldHandlerクラス

Sitecore.Commerce.Plugin.Search.AbstractIndexFieldHandlerクラスは、Commerce Engineが標準で提供する[検索フィールドハンドラー](https://doc.sitecore.com/xp/ja/developers/101/sitecore-experience-commerce/search-field-handlers.html "Search field handlers")を定義します。

using System.Collections.Concurrent;

namespace Sitecore.Commerce.Plugin.Search
{
 /// <summary>
 /// Defines the abstract index field handler.
 /// </summary>
 public abstract class AbstractIndexFieldHandler
 {
 /// <summary>
 /// Composes the field value to be used in the index
 /// </summary>
 /// <param name="source">The source for the value</param>
 /// <param name="context">The context</param>
 /// <returns>The value of the field to be use in the index</returns>
 public abstract object ComposeValue(object source, ConcurrentDictionary<string, object> context);
 }
}

Sitecore.Commerce.Plugin.Search.AbstractIndexFieldHandlerクラスは同期ComposeValueメソッドを呼び出して値をインデックスに合成します。

-   ComposeValueのsourceの議論は、処理対象のエンティティへのアクセスを提供します。
    
-   context辞書は、エンティティの階層的な位置、言語、所属するカタログ、現在の言語などについてさらに詳しい情報を提供しています。以下の表はキーと値の説明を示しています。
    
    キー
    
    価値
    
    CommerceContext
    
    現在の環境に関する情報を提供する商業の文脈。
    
    SitecoreItemSearchScopePolicy
    
    検索範囲ポリシーは対象インデックスに関する情報を提供します。
    
    LanguageCode
    
    言語コード。
    
    Parent
    
    直系の親体のID。
    
    MappedCatalog
    
    このエンティティが属するカタログに関する高レベルの情報を提供します。
    
    EntityHierarchy
    
    アイテムに関する階層的情報。与えられたアイテムへの全経路へのアクセスを提供します。
    
    IndexingOptions
    
    現在のインデックス操作に関する情報。ターゲットデータベース名へのアクセスを提供します。
    
    DeterministicId
    
    データプロバイダーでSitecore Item IDとしても使われるエンティティ固有のID。