Any request that asks for refinements is also requesting groups, if the attributes to be returned are configured as part of groups.
In other words, the Conversation Web Service returns groups for those types of queries that return refinements. Any attributes returned from the Conversation Web Service as refinements are returned as part of their respective groups.
The request for groups is implemented with the RefinementGroupConfig element of the Conversation Web service request. This element contains one or more RefinementConfig elements that list which attributes, out of all valid properties returned with a navigation query, should return actual refinement values. Note that only the top-level refinement values are returned.
<complexType name="RefinementGroupConfig"> <sequence> <element maxOccurs="unbounded" minOccurs="0" name="RefinementConfig" type="cs_v3_0:RefinementConfig"/> </sequence> <attribute name="Name" type="cs_v3_0:NonEmptyString" use="required"/> <attribute name="Expose" type="boolean" use="required"/> <attribute name="ExposeAllPropertyRefinements" type="boolean"/> </complexType>
Attribute | Description |
---|---|
Name | Required. The name of the group. |
Expose | Required. Specify
true to expose all top-level attributes in the
group, or
false (the default) to just show the root of
the group.
Note: If an attribute is a managed attribute, it contains a
hierarchy of attributes under its root. Whether these nested attributes are
exposed is controlled by the
Expose attribute on the
RefinementConfig element for each attribute
within a managed attribute. The default for
Expose is
false.
|
ExposeAllPropertyRefinements | Optional. If set to
true, specifies whether to expose all
attribute refinements underneath each managed attribute that has them. The
default is
false.
This setting supersedes the Expose attribute on the RefinementConfig element for each attribute refinement. |
<complexType name="NavigationMenuItemGroup"> <sequence> <element maxOccurs="unbounded" minOccurs="0" name="NavigationMenuItem" type="cs_v3_0:NavigationMenuItem"/> </sequence> <attribute name="HasRefineableProperties" type="boolean"/> <attribute name="Name" type="string" use="required"/> </complexType>
The required attribute HasRefineableProperties specifies whether a group has attributes that could be refined further.
To request groups:
<Request xmlns="http://www.endeca.com/MDEX/conversation/3/0"> <State/> <NavigationMenuConfig MaximumRefinementCount="10" ReturnFullPath="true" ExposeAllRefinements="false" Id="Navigation"> <RefinementGroupConfig Name="WineGroup" Expose="true"> <RefinementConfig Name="Flavors" Expose="true" MaximumCount="2"/> </RefinementGroupConfig> <RefinementGroupConfig Name="ProvenanceGroup" Expose="false"/> </NavigationMenuConfig> </Request>
The Conversation Web Service result includes results for one group, WineGroup, for which refinements were requested to be exposed.
<cs:NavigationMenu Id="Navigation"> <cs:NavigationMenuItemGroup Name="WineGroup" HasRefineableProperties="true"> <cs:NavigationMenuItem Name="WineType" DisplayName="Wine Type" MultiSelect="None" HasMore="true"> <cs:ExposureControl Exposed="false"/> <cs:RootDimensionValue DimensionName="WineType" Spec="/"/> <cs:FullPath> <cs:DimensionValue DimensionName="WineType" Spec="/">WineType</cs:DimensionValue> </cs:FullPath> </cs:NavigationMenuItem> <cs:NavigationMenuItem Name="Wine" DisplayName="Wine Name" MultiSelect="None" HasMore="true"> <cs:ExposureControl Exposed="false"/> </cs:NavigationMenuItem> <cs:NavigationMenuItem Name="Region" DisplayName="Region Grown" MultiSelect="None" HasMore="true"> <cs:ExposureControl Exposed="false"/> </cs:NavigationMenuItem> <cs:NavigationMenuItem Name="Flavors" DisplayName="Flavors" MultiSelect="None" HasMore="true"> <cs:ExposureControl Exposed="true"/> <cs:Refinement Name="Flavors" Spec="Almond" Label="Almond" Count="1312"/> <cs:Refinement Name="Flavors" Spec="Anise" Label="Anise" Count="1626"/> </cs:NavigationMenuItem> </cs:NavigationMenuItemGroup> </cs:NavigationMenu>