You can update records in a running data domain by removing standard attribute and managed value assignments.
Both elements can delete standard attribute assignments as well as managed value assignments. Note that the standard attributes or managed values are not removed from the data domain; they are removed only from the specified records.
You can use both elements in the same updateRecords operation. In this case, the wildcardDeleteAssignments request is processed before the deleteAssignments request.
Both elements are case sensitive, including the standard attribute and managed value names and their assignment values.
Assignment deletion cannot be combined in the same request with any operation that would modify the assignments to be deleted.
The deleteAssignments element of the updateRecords sub-operation removes individual standard attribute and/or managed value assignments from the records in your data domain, but does not otherwise affect the record. You can remove one or more assignments in the same request.
<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:updateRecords> <ns:recordSpecifier>?</ns:recordSpecifier> <ns:deleteAssignments> <ns1:attribute name="?">?</ns1:attribute> </ns:deleteAssignments> </ns:updateRecords> </ns:ingestChanges> </soapenv:Body> </soapenv:Envelope>where the string that you add to a recordSpecifier element is an EQL expression identifying records.
<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:updateRecords> <ns:recordSpecifier>"price" > 45</ns:recordSpecifier> <ns:deleteAssignments> <ns1:attribute name="color">purple</ns1:attribute> </ns:deleteAssignments> </ns:updateRecords> </ns:ingestChanges> </soapenv:Body> </soapenv:Envelope>
The example removes one value, purple, of the color standard attribute assignment for all records whose values for the price attribute are higher than 45.
<ingest:ingestChangesResponse xmlns:ingest="http://www.endeca.com/MDEX/ingest/3/0"> <ingest:numPropertiesCreated>0</ingest:numPropertiesCreated> <ingest:numRecordsAffected>4</ingest:numRecordsAffected> <ingest:numRecordsDeleted>0</ingest:numRecordsDeleted> </ingest:ingestChangesResponse>
The numRecordsAffected element in the response shows that four records were successfully modified.
The wildcardDeleteAssignments element of the updateRecords element in the ingestChanges operation removes all assignments from the same standard attribute or managed value at once. This operation, similar to assignment deletion, cannot be combined with any operation that modifies the assignments to be deleted.
<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:updateRecords> <ns:recordSpecifier>?</ns:recordSpecifier> <ns:wildcardDeleteAssignments> <ns1:attribute name="?"/> </ns:wildcardDeleteAssignments> </ns:updateRecords> </ns:ingestChanges> </soapenv:Body> </soapenv:Envelope>
<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:updateRecords> <ns:recordSpecifier>"partID" = 'P4000'</ns:recordSpecifier> <ns:wildcardDeleteAssignments> <ns1:attribute name="color"/> </ns:wildcardDeleteAssignments> </ns:updateRecords> </ns:ingestChanges> </soapenv:Body> </soapenv:Envelope>
In the example, if record P4000 had six assignments from the color standard attribute, then all six assignments would be removed.
<ingest:ingestChangesResponse xmlns:ingest="http://www.endeca.com/MDEX/ingest/3/0"> <ingest:numPropertiesCreated>0</ingest:numPropertiesCreated> <ingest:numRecordsAffected>1</ingest:numRecordsAffected> <ingest:numRecordsDeleted>0</ingest:numRecordsDeleted> </ingest:ingestChangesResponse>