Deleting managed attribute values

You can only delete all managed attribute values for a specific managed attribute, by deleting its PDR (this deletes the associated DDR and all assignments on it). You cannot delete a single managed attribute value. Since managed attribute values are represented in the index as records, to delete them, you use the Data Ingest Web Service operations for deleting records.

To delete a set of managed attribute values:
  1. Use the DeleteRecords operation of the IngestChanges element in the Data Ingest Web Service request, to delete a PDR for the associated managed attribute.
    For example, assume a managed attribute named "location" (both its PDR key and DDR key are named "location"). The following request of the Data Ingest Web Service deletes the PDR and its associated DDR:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.endeca.com/MDEX/ingest/3/0" xmlns:ns1="http://www.endeca.com/MDEX/XQuery/2009/09">
       <soapenv:Header/>
       <soapenv:Body>
          <ns:ingestChanges>
             <ns:Language>en</ns:Language>
             <ns:deleteRecords>
                <ns:recordSpecifier>"mdex-property_Key" = location</ns:recordSpecifier>
             </ns:deleteRecords>
          </ns:ingestChanges>
       </soapenv:Body>
    </soapenv:Envelope>

    As a result of this step, the PDR for the managed attribute, its associated DDR, and all the managed attribute values are deleted.

    Note that this request does not delete the parent PDR (in this example, let it be named "loc_parent"), and spec PDR (named "loc_spec").

  2. (Optional). You can also delete the two PDRs created for the mdex-dimension-value_Spec and mdex-dimension-value_Parent properties of the DDR. These two properties, and their associated PDRs are created by the Endeca Server when you add a DDR. They are not deleted automatically when you delete a DDR though. If you are not using these non-data PDR records for any other assignments in your data domain, you can also delete them, when deleting managed attribute values. Since they are records, you also delete them with the Data Ingest Web Service, using the request similar to the one in this topic, and specifying:
    For the spec PDR named "loc_spec":
    ...
    <ns:recordSpecifier>"mdex-property_Key" = loc_spec</ns:recordSpecifier>
    ...
    For the parent PDR named "loc_parent":
    ...
    <ns:recordSpecifier>"mdex-property_Key" = loc_parent</ns:recordSpecifier>
    ...

    For more information on deleting records, see the Oracle Endeca Server Data Loading Guide.