Typically, you add more than one managed attribute value. To add a
set of them, you first define a managed attribute with which the values will be
associated. Next, you add the managed attribute values, associating them with
the managed attribute.
The
procedure in this topic utilizes an example to illustrate how to add a set of
managed attribute values that define a hierarchy. It builds an hierarchy of
managed attribute values for the managed attribute "location", by adding parent
managed attribute value "USA", followed by managed attribute values
"Massachusetts", and "New York State", and their descendant managed attribute
values "Boston", and "New York".
Note: You can add managed attribute values using two different web
services: Configuration Web Service and Data Ingest Web Service. This topic
discusses adding them with
putManagedAttributeValues of the Configuration Web
Service. Since, after they are added, managed attribute values are represented
as records in the Endeca Server index for the data domain, you can also use the
Data Ingest Web Service to add them as non-data records, before adding any data
records. For information, see the
Oracle Endeca Server Data Loading Guide.
The examples of Configuration Web Service requests in this topic are
abbreviated and do not show namespaces. They use the following namespaces:
xmlns:ns="http://www.endeca.com/MDEX/config/services/types/3/0"
and
xmlns:ns1="http://www.endeca.com/MDEX/config/XQuery/2009/09".
Before you add one or more managed attribute values, note the
following requirements:
- A managed attribute must
exist in the index of the data domain. This means that its associated PDR and
DDR must be created. Note that if a DDR does not exist, you can create it in
the same request in which you are adding managed attribute values.
- When creating a DDR (as
shown in the procedure in this topic), you can omit specifying the values for
mdex-dimension-value_Parent and
mdex-dimension-value_Spec, as these properties on
the DDR are optional. If you do not explicitly provide values for them in the
putDimension request that creates a DDR for the
managed attribute, Endeca Server automatically creates them and assigns their
names. For example, for a managed attribute "location", if parent and spec are
not specified,
mdex-dimension_location_Parent, and
mdex-dimension_location_Spec are created. If you
specify these properties, you can provide your own names. Whether or not you
specify these properties, once you add a DDR, Endeca Server creates two PDR
records in the index, for each of these properties. These two description
records represent non-data records, and are needed to provide the internal
structure that uniquely identifies each added managed attribute value record
(via its value on the spec), and also defines the hierarchy (via its values on
both the spec and the parent attributes).
- When creating the top-most
managed attribute value for the managed attribute, specify the sign
"/" for its parent managed attribute value. This is
because, when a managed attribute is created, the spec for the root managed
attribute value is also created automatically in the index, and its value is
"/".
- When you add a managed
attribute value with
putManagedAttributeValues, its name, synonyms, and
rank attributes are optional. All other parameters (spec, parent managed
attribute value, and managed attribute spec) are required.
- You can optionally add its
synonyms, which Endeca Server will use in searches. Since it is not possible to
change or update synonyms on already added managed attribute values, plan which
synonyms you are going to require. If you later need to add more synonyms,
delete the existing managed attribute (this deletes all associated managed
attribute values), and replace it with new values and synonyms.
- You can update a managed
attribute value with a new name. In this case, when you use the
putManagedAttributeValues for an existing value
but specify a new name, the value is updated with this name.
- You can also add static
ranks (and update them) to the managed attribute values. Ranks are not included
in the examples in this topic. For information on adding them, see
Adding and updating ranks.
- You can add more than one
managed value attribute in one operation. However, if any of the values are
specified incorrectly, causing Endeca Server to issue an error, the entire
Configuration Web Service request fails and no values are added.
To add a set of managed attribute values:
Now that you have created these managed attribute values, you can list
them with
listManagedAttributeValues operation of the
Configuration Web Service.