Managed attribute values represent specific value assignments on managed attributes in your data domain. Through managed attribute values, you can express hierarchical relationships and other useful information (such as synonyms and ranking), on record refinements in your data domain.
You add managed attribute values before loading the source records into the data domain. Next, when you load source records that include these values (such as "MA", or "Boston"), Endeca Server recognizes them as managed attribute values, thus letting your end users navigate and search on them, utilizing their hierarchy, as well as static ranks and synonyms (if specified).
Inside the Endeca Server index for each data domain, each of the added managed attribute values, (such as "MA" and "Boston" in our example), are themselves represented as records. These records are described by the PDRs, DDRs, and Managed Attribute Value Description Records (MAVDRs) that are created in the index, when you add managed attributes and their values.
<ns:configTransaction>
<ns:putManagedAttributeValues>
<ns1:mav>
<name>?</name>
<spec>?</spec>
<parent>?</parent>
<managedAttribute>?</managedAttribute>
<synonym>?</synonym>
<synonym>?</synonym>
<rank>?</rank>
</ns1:mav>
</ns:putManagedAttributeValues>
</ns:configTransaction>
In this structure, the
spec,
parent, and
managedAttribute elements are required, all other
elements are optional.
| Element | Type | Description |
|---|---|---|
| name | string | Optional. The display name of the managed
attribute value record. You define this property when adding a managed
attribute value. For example, you can define a managed attribute value with the
name "Boston":
<mav><name>Boston</name>...</mav> Inside the schema for your data records, when you create
this managed attribute value, its MAVDR is created. The MAVDR gets an
assignment on
mdex-dimension-value_Name:
<attribute name="mdex-dimension-value_Name" type="mdex:string">Boston</attribute> |
| spec | string | Required. A unique identifier, or a spec,
of the managed attribute value record. For example, you can define a managed
attribute value with the spec "bos":
<mav> <spec>bos</spec> ... </mav> Inside the schema for your data records, this value, in
turn, is an assignment on the
mdex-dimension_my_attr_key_Spec
attribute that is created when you add a DDR for the associated managed
attribute with the key
my_attr_key. For example,
for a managed attribute with the key "location", when you create its DDR,
another record is automatically created, — namely, a PDR for
mdex-dimension_location_Spec. It is always
created as unique and single-assign, as values on it uniquely identify managed
attribute values that you will be adding. Next, when you add a managed
attribute value, such as "bos", the value "bos" becomes an assignment on
mdex-dimension_location_Spec:
<attribute name="mdex-dimension_location_Spec" type="mdex:string">bos</attribute> Note: If, when creating the DDR for the managed attribute with
the key
value, you do not specify
your own value for its
mdex-dimension-value_Spec attribute, the
naming structure of the format
mdex-dimension_value_Spec
is used automatically by Endeca Server when it creates the PDR for the managed
attribute value spec.
|
| parent | string | Required. The spec of the parent managed
attribute value. Only one is allowed. To continue with the example, for a
managed attribute value with the spec "bos", the parent managed attribute value
spec is "MA" (it must already exist, in order to be specified):
<mav> <spec>bos</spec> <parent>MA</parent> ... </mav> Inside the schema for your data records, this value, in
turn, is an assignment on the
mdex-dimension_my_attr_key_Parent
attribute that is created when you add a DDR for the associated managed
attribute with the key
my_attr_key. For example,
for a managed attribute with the key "location", when you create its DDR,
another record is automatically created, — namely, a PDR for
mdex-dimension_location_Parent. It is always
created as single-assign. Next, when you add a managed attribute value, such as
"MA", the value "MA" becomes an assignment on
mdex-dimension_location_Parent,
for another managed attribute value, "bos":
<attribute name="mdex-dimension_location_Parent" type="mdex:string">MA</attribute> Note: If, when creating the DDR for the managed attribute with
the key
value, you don't specify
your own value for its
mdex-dimension-value_Parent attribute, the
naming structure of the format
mdex-dimension_value_Parent
is used automatically by the Endeca Server, when it creates the PDR for the
parent managed attribute value.
|
| managedAttribute | string | Required. The key (or spec) of the managed
attribute to which this managed attribute value relates. Only one is allowed.
You define it when adding a managed attribute value. For example, for the value
Boston (whose spec is "bos"), the managed attribute key it is associated with
is "location":
<mav> <spec>bos</spec> <managedAttribute>location</managedAttribute> ... </mav> Inside the schema for your data records, this value,
"location", is a key of the managed attribute "location", in the DDR that
defines this managed attribute:
<mdex-dimension_Key>location</mdex-dimension_Key>In the MAVDR for a managed attribute value you are adding, it becomes an assignment to the managed attribute "location": <attribute name="mdex-dimension-value_Dimension" type="mdex:string">location</attribute> |
| rank | integer | Optional. Static rank of the managed
attribute value. Only one is allowed. This rank is an integer number according
to which the Endeca Server ranks the managed attribute values within each
managed attribute's hierarchy, when returning them to the end users. This rank
affects the order in which values are displayed in the front-end application,
such as Studio. You can optionally specify the rank, when adding a managed
attribute value with the
putManagedAttributeValue operation.
mdex-dimension-value_Rank
<ns1:mav> <spec>bos</spec> <rank>3</rank> ... </mav> Inside the schema for your data records, the value of rank,
such as "3", becomes an assignment on the
mdex-dimension-value_Rank attribute of the
MAVDR for the managed attribute you are adding:
<attribute name="mdex-dimension-value_Rank" type="mdex:integer">3</attribute> |
| synonym | string | Optional. List of one or more synonyms, for
the managed attribute value. You can optionally specify one or more synonyms,
when adding a managed attribute value. For example, for the value Boston, the
synonyms can be "Beantown", and "the Hub":
<ns1:mav> <spec>bos</spec> <synonym>Beantown</synonym> <synonym>the Hub</synonym> ... </mav> Inside the schema for your data records, the value of any
synonym, such as "Beantown", becomes an assignment on the
mdex-dimension-value_Synonyms attribute of
the MAVDR for the managed attribute you are adding:
<attribute name="mdex-dimension-value_Synonyms" type="mdex:string">Beantown</attribute> |
To conclude, each managed attribute value record is identified by its own pair of spec and parent values that are unique to this managed attribute value. The following example illustrates how to add a managed attribute value, for a specific managed attribute.
<mdex-property_Key>location</mdex-property_Key>
<mdex-dimension_Key>location</mdex-dimension_Key>Once you create this DDR, Endeca Server automatically creates two additional PDR records (if you do not specify your own values for them in the DDR):
<mdex-property_Key type="mdex:string" xmlns="">mdex-dimension_location_Parent</mdex-property_Key> <mdex-property_Key type="mdex:string" xmlns="">mdex-dimension_location_Spec</mdex-property_Key>
<ns:configTransaction>
<ns:putManagedAttributeValues>
<ns1:mav>
<name>USA</name>
<spec>US</spec>
<parent>/</parent>
<managedAttribute>location</managedAttribute>
</ns1:mav>
<ns1:mav>
<name>Massachusetts</name>
<spec>MA</spec>
<parent>US</parent>
<managedAttribute>location</managedAttribute>
</ns1:mav>
<ns1:mav>
<name>Boston</name>
<spec>bos</spec>
<parent>MA</parent>
<managedAttribute>location</managedAttribute>
</ns1:mav>
</ns:putManagedAttributeValues>
</ns:configTransaction>
(For simplicity, namespaces are omitted in this example. They
represent
xmlns:ns="http://www.endeca.com/MDEX/config/services/types/3/0"
and
xmlns:ns1="http://www.endeca.com/MDEX/config/XQuery/2009/09",
respectively.)
When a managed attribute value is created, Endeca Server "attaches" it to a specific managed attribute. In this example, for a managed attribute "location", when you create a managed attribute value "Boston", the managed attribute's value spec, "bos", is assigned on the mdex-dimension_location_Spec that was created automatically when the "location" managed attribute was created, by adding its DDR. Similarly, the managed attribute's value parent ,"MA", is assigned on the mdex-dimension_location_Parent.