If you load managed attribute values for a managed attribute that
has not already been created and configured in the data domain, the managed
attribute is created with system defaults for the DDR, as well as for the PDR
if it does not already exist.
Therefore, if the default managed
attribute and standard attribute schemas (DDR and PDR configurations) meet your
needs, you can load managed attribute values without loading managed attribute
and standard attribute schemas (configuring the DDR and PDR). If you need to
customize the managed attribute or standard attribute schema (configure the DDR
or the PDR), or both, you should load the schemas (PDR and DDR configurations)
before loading managed attribute values.
Use the
Merge Managed Values component to add managed
values to a managed attribute, or to modify existing managed attribute values.
An instance of the
Merge Managed Values component can only add
managed values to, or modify the values of, one managed attribute. Adding
values to multiple managed attributes requires multiple instances of the
component, either in the same graph or in different graphs.
You can also modify the following properties of managed attributes that
have already been loaded:
Other properties (parent, spec, and synonym) cannot be modified once the
managed attribute value has been loaded.
Managed attribute value input file
The input schema of the managed attribute input file is predefined.
The first row is the header row and must define the following properties:
spec|displayname|parent|synonym|rank
where:
- spec
is a unique string identifier for the managed value. This ID is used to
associate child values with parent values.
This field is required.
- displayname is the
name displayed in the user interface for the managed value.
This field is optional.
- parent is the
parent ID for this managed value. If the value is a root value (in other words,
if the value has no parent, but only children), enter a forward slash (/) for
this property. If the value is a child managed value, enter the unique ID of
the parent managed value.
This field is required when load managed attribute values. It is
optional when updating managed attribute values, and should be null. If the
value of this property is not null when updating managed attribute values, the
graph will fail and an error will be returned.
- synonym optionally
defines one or more synonyms for the managed value. When you add a synonym to a
managed attribute value, the value will be returned when users search on the
synonym. You can add synonyms to both root and child managed values. You can
add multiple synonyms to a single managed value. Specify the delimiter for
multiple synonyms on the
Edit Add Managed Values dialog.
This field is optional.
- rank
is an integer that specifies the rank order of the value in the set of values
for the managed attribute.
This field is optional.
The following graphic illustrates a simple managed attribute input
file:
This example defines several parent categories, including CAT_BIKES
and CAT_COMPONENTS. Each of these categories is ranked.
The following values are defined as children of the CAT_BIKES value
(with rankings):
- Mountain Bikes (Rank 11)
- Road Bikes (Rank 12)
- Touring Bikes (Rank 13)
These values are defined as children of the CAT_COMPONENTS value (with
rankings):
- Handlebars (Rank 21)
- Bottom Brackets (Rank 22)
- Brakes (Rank 23)
- Chains (Rank 24)
All values of the same managed attribute share the same ranking
structure. You cannot duplicate ranking values. Consider this requirement when
defining the rankings for your managed attribute values and develop a ranking
practice that ensures all ranks will be unique. For example, you might use a
four-digit ranking structure, where the place of the digit indicates the level
of the ranking of the managed attribute value within the tree of available
values. For example:
- 0002
A first-level managed attribute value (is a child of /), such as
the CAT_COMPONENTS managed attribute value in the example input file.
- 0021
A second-level managed attribute value (parent is a child /), such
as the Road Bikes managed attribute value in the example input file.
- 0211
A third-level managed attribute value (three levels down from /).
- 3211
A fourth-level managed attribute value (four levels down from /).
You could modify this structure to meet your needs, or choose to use
a different ranking approach.
The input file is typically stored in the
data-in directory of the project.
While the
display name,
synonym, and
rank fields are optional, the fields must be
included in the input records. For example:
CAT_CLOTHING||/||
Modifying managed attribute values
You can modify the
display name and
rank of existing managed attribute values. You
cannot modify the
spec,
parent, or
synonym of existing managed attribute values.
- If you attempt to change
the
spec of a managed attribute value, a new managed
attribute value will be created with the properties you specify.
- If you attempt to change
the
parent of a managed attribute value, Endeca Server
returns the following error, and the graph fails:
Error applying updates: Attempting to change hierarchy of
existing managed attribute value "1" with assignment of "CAT_BIKES_FOO" to
attribute "mdex-dimension_category_Parent"
- If you attempt to modify
the
synonym of a managed attribute value, Endeca
Server returns the following error and the graph fails:
Error applying updates: Attempting to add synonym to managed
attribute value "1" with assignment of "Mtn Bike, Mountain Bicycle" to
attribute "mdex-dimension-value_Synonyms"
When modifying managed attribute values, the input file must include
values for the
spec of the managed attribute values you want to
modify and the
name or
rank, or both, depending on which property you want
to modify. While you can omit values for the
parent and
synonym, as well as the
name or
rank if you are not modifying them, each record must
include these fields. The following code illustrates a simple example:
spec,name,parent,synonym,rank
1,Mountain Bicycles,,,15
If this input was submitted after loading the managed attribute
values illustrated elsewhere, the managed attribute named "Mountain Bikes"
(spec 1) would be renamed to "Mountain Bicycles", and its rank would be updated
to 15. Note that the
parent and
synonym fields are empty in this input record.
Managed attribute value input graph
A basic managed attribute value input graph consists of two
components:
The two components are joined by a basic edge. See
Connecting two components with an edge.
The following graphic illustrates a typical configuration: