Removing all records from the data store

Use the clearMdex operation in the Data Ingest Web Service to remove all data records and also the schema records that define the data store 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 store with a new set of records).
To remove all data and schema records, use the clearMdex element in a Data Ingest Web Service request. The request should use this format:
<ingest:clearMdex/>
Note: If you submit this request after a Transaction Web Service request that starts an outer transaction, the clearMdex 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 clearMdex 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/1/0">
 <soapenv:Header/>
     <soapenv:Body>
        <ingest:clearMdex>
           <ingest:OuterTransactionId>txId</ingest:OuterTransactionId>
        </ingest:clearMdex>
      </soapenv:Body>
   </soapenv:Envelope>                                                     
This request removes the data records and the schema records in the data store.
A successful clearMdexResponse returned from the above sample request should return the number of records deleted, and look like this:
<ingest:clearMdexResponse>
 <ingest:OuterTransactionId>txId</ingest:OuterTransactionId>
  <ingest:numRecordsDeleted>175</ingest:numRecordsDeleted>
</ingest:clearMdexResponse>

Note that if you specify an outer transaction ID that does not match the ID of the currently running transaction, the clearMdex 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 store, you want to provision it again with the default configuration settings. To provision the data store, run provisionMdex.

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