Removing all records from the data domain

Use the clearDataStore operation in the Data Ingest Web Service to remove all data records and also the schema records that define the data domain configuration.

Before using this operation, ensure that you export the configuration. Also, it is assumed that you intend to remove all data records by using this operation (for example, with the intent to populate the data domain with a new set of records).
To remove all data and schema records, use the clearDataStore element in a Data Ingest Web Service request. The request should use this format:
<ingest:clearDataStore/>
Note: If you submit this request after a Transaction Web Service request that starts an outer transaction, the clearDataStore request must specify the outer transaction ID element as the first element in the request. If no transactions have been started, the ID element must be omitted or its value should be empty.

To remove all records from the Oracle Endeca Server:

Create a clearDataStore request, similar to the example below, and send the request to the Data Ingest Web Service:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ingest="http://www.endeca.com/MDEX/ingest/2/0">
 <soapenv:Header/>
     <soapenv:Body>
        <ingest:clearDataStore>
           <ingest:OuterTransactionId>txId</ingest:OuterTransactionId>
        </ingest:clearDataStore>
      </soapenv:Body>
</soapenv:Envelope>

This request removes the data records and the schema records in the data domain.

A successful clearDataStoreResponse returned from the above sample request should return the number of records deleted, and look like this:
<ingest:clearDataStoreResponse>
 <ingest:OuterTransactionId>txId</ingest:OuterTransactionId>
  <ingest:numRecordsDeleted>175</ingest:numRecordsDeleted>
</ingest:clearDataStoreResponse>

Note that if you specify an outer transaction ID that does not match the ID of the currently running transaction, the clearDataStore operation fails, notifying you of the transaction ID that is in progress. In addition, if no outer transactions have been started with the Transaction Web Service, but you still specify an element with the value for an ID, this request also fails.

After you have removed all the data and schema records from the data domain, you want to provision it again with the default configuration settings. To provision the data domain, run provisionDataStore.

Note: Clearing the data domain without provisioning it again leaves the data domain in an invalid state, preventing all further operations, including importing the configuration.