返される属性がグループの一部として構成されている場合、絞込みを要求するリクエストはグループもリクエストします。
つまり、対話Webサービスは、絞込みを返すタイプの問合せに対してグループを返します。対話Webサービスから絞込みとして返される属性は、それぞれのグループの一部として返されます。
グループのリクエストは、対話Webサービス・リクエストのRefinementGroupConfig要素で実装されます。この要素には、ナビゲーション問合せで返された有効なすべてのプロパティのうち、実際の絞込み値を返す必要がある属性をリストする1つ以上のRefinementConfig要素が含まれます。最上位レベルの絞込み値のみ返されることに注意してください。
<complexType name="RefinementGroupConfig"> <sequence> <element maxOccurs="unbounded" minOccurs="0" name="RefinementConfig" type="cs_v2_0:RefinementConfig"/> </sequence> <attribute name="Name" type="cs_v2_0:NonEmptyString" use="required"/> <attribute name="Expose" type="boolean" use="required"/> <attribute name="ExposeAllPropertyRefinements" type="boolean"/> </complexType>
属性 | 説明 |
---|---|
Name | 必須です。グループの名前。 |
Expose | 必須です。グループのすべての最上位レベル属性を公開する場合はtrueを指定し、グループのルートのみ表示するにはfalse (デフォルト)を指定します。
注意: 属性が管理属性の場合は、ルートの下の属性の階層が含まれます。これらのネストされた属性が公開されるかどうかは、管理属性内の属性ごとにRefinementConfig要素のExpose属性で制御されます。Exposeのデフォルトはfalseです。
|
ExposeAllPropertyRefinements | オプション。trueに設定されている場合は、属性絞込みを持つ各管理属性の下のすべての属性絞込みを公開するかどうかを指定します。デフォルトはfalseです。
この設定は、属性絞込みごとのRefinementConfig要素のExpose属性よりも優先されます。 |
<complexType name="NavigationMenuItemGroup"> <sequence> <element maxOccurs="unbounded" minOccurs="0" name="NavigationMenuItem" type="cs_v2_0:NavigationMenuItem"/> </sequence> <attribute name="HasRefineableProperties" type="boolean"/> <attribute name="Name" type="string" use="required"/> </complexType>
必須属性HasRefineablePropertiesは、さらに絞込みが可能な属性がグループにあるかどうかを指定します。
グループをリクエストする手順:
<Request xmlns="http://www.endeca.com/MDEX/conversation/2/0"> <State/> <ContentElementConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="NavigationMenuConfig" MaximumRefinementCount="10" ReturnFullPath="true" ExposeAllRefinements="false" HandlerFunction="NavigationMenuHandler" HandlerNamespace="http://www.endeca.com/MDEX/conversation/2/0" Id="Navigation"> <RefinementGroupConfig Name="FlavorGroup" Expose="true"> <RefinementConfig Name="Flavors" Expose="true" MaximumCount="2"/> </RefinementGroupConfig> <RefinementGroupConfig Name="ProvenanceGroup" Expose="false"/> </ContentElementConfig> </Request>
対話Webサービスの結果には、絞込みの公開がリクエストされたFlavorGroupという1つのグループに対する結果が含まれます。
<cs:ContentElement xsi:type="cs:NavigationMenu" Id="Navigation"> <cs:NavigationMenuItemGroup Name="FlavorGroup" HasRefineableProperties="true"> <cs:NavigationMenuItem Name="Flavors" DisplayName="Flavors" MultiSelect="And" HasMore="true"> <cs:ExposureControl Exposed="true"> <cs:Operator OwnerId="Navigation" xsi:type="cs:RefinementHideOperator" Name="Flavors" Group="FlavorGroup" Spec="/"/> </cs:ExposureControl> <cs:Refinement Name="Flavors" Spec="Currant" Label="Currant"> <cs:Operator xsi:type="cs:RefinementOperator" Name="Flavors" Spec="Currant"/> </cs:Refinement> <cs:Refinement Name="Flavors" Spec="Oak" Label="Oak"> <cs:Operator xsi:type="cs:RefinementOperator" Name="Flavors" Spec="Oak"/> </cs:Refinement> <cs:RootDimensionValue DimensionName="Flavors" Spec="/"/> <cs:FullPath><!-- path information omitted in this example--></cs:FullPath> </cs:NavigationMenuItem> <cs:NavigationMenuItem Name="Drinkability" DisplayName="Drinkability" MultiSelect="None" HasMore="true"> <cs:ExposureControl Exposed="false"> <cs:Operator OwnerId="Navigation" xsi:type="cs:RefinementExposeOperator" Name="Drinkability" Group="FlavorGroup" Spec="/"/> </cs:ExposureControl> <cs:RootDimensionValue DimensionName="Drinkability" Spec="/"/> <cs:FullPath><!-- path information omitted in this example --></cs:FullPath> </cs:NavigationMenuItem> </cs:NavigationMenuItemGroup> <cs:NavigationMenuItemGroup Name="ProvenanceGroup" HasRefineableProperties="true"/> </cs:ContentElement>