この手順では、最初にコレクションのレコードを削除してからコレクション自体を削除する方法について説明します。
次の手順では、soapUIを使用して様々なAPIコールを行います。ただし、同じアクションを実行するIntegrator ETLグラフを作成できます。
<ingestChanges>
<deleteRecords>
<recordSpecifier>ResellerKey IS NOT NULL</recordSpecifier>
</deleteRecords>
</ingestChanges>
recordSpecifier要素のEQL文は、コレクション内のレコード用のフィルタとしてコレクションの一意のプロパティ・キーを使用します。つまり、この一意のプロパティ・キーに対してNULL以外の割当てを持つすべてのレコードが、削除対象として選択されます。
コレクションのレコードを削除してからコレクション自体を削除する手順:
次のサンプル・レスポンスでは、ResellerKey属性が、削除するResellersコレクションの一意のプロパティ・キーです。
<collectionRecord collectionKey="Resellers" displayName="reseller data" uniquePropertyKey="ResellerKey">
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.endeca.com/MDEX/transaction/1/0">
<soapenv:Header/>
<soapenv:Body>
<ns:startOuterTransaction>
<ns:OuterTransactionId>50</ns:OuterTransactionId>
</ns:startOuterTransaction>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<transaction:startOuterTransactionResponse xmlns:transaction="http://www.endeca.com/MDEX/transaction/1/0">
<Started xmlns="http://www.endeca.com/MDEX/transaction/1/0">true</Started>
<OuterTransactionId xmlns="http://www.endeca.com/MDEX/transaction/1/0">50</OuterTransactionId>
</transaction:startOuterTransactionResponse>
</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:OuterTransactionId>50</ns:OuterTransactionId>
<ns:Language>en</ns:Language>
<ns:deleteRecords>
<ns:recordSpecifier>ResellerKey IS NOT NULL</ns:recordSpecifier>
</ns:deleteRecords>
</ns:ingestChanges>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ingest:ingestChangesResponse xmlns:ingest="http://www.endeca.com/MDEX/ingest/3/0">
<ingest:numPropertiesCreated>0</ingest:numPropertiesCreated>
<ingest:numRecordsAffected>0</ingest:numRecordsAffected>
<ingest:numRecordsDeleted>334</ingest:numRecordsDeleted>
</ingest:ingestChangesResponse>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.endeca.com/endeca-server/sconfig/3/0">
<soapenv:Header/>
<soapenv:Body>
<ns:deleteCollections>
<ns:outerTransactionId>50</ns:outerTransactionId>
<ns:language>en</ns:language>
<ns:collectionKey collectionKey="Resellers"/>
</ns:deleteCollections>
</soapenv:Body>
</soapenv:Envelope>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns3:deleteCollectionsResponse xmlns:ns2="http://www.endeca.com/MDEX/eql_parser/types"
xmlns:ns3="http://www.endeca.com/endeca-server/sconfig/3/0">
<ns3:numCollectionsDeleted>1</ns3:numCollectionsDeleted>
</ns3:deleteCollectionsResponse>
</env:Body>
</env:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.endeca.com/endeca-server/sconfig/3/0">
<soapenv:Header/>
<soapenv:Body>
<ns:deleteFilterRules>
<ns:outerTransactionId>50</ns:outerTransactionId>
<ns:language>en</ns:language>
<ns:filterRuleKey filterRuleKey="ResellerRule"/>
</ns:deleteFilterRules>
</soapenv:Body>
</soapenv:Envelope>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns3:deleteFilterRulesResponse xmlns:ns2="http://www.endeca.com/MDEX/eql_parser/types"
xmlns:ns3="http://www.endeca.com/endeca-server/sconfig/3/0">
<ns3:numFilterRulesDeleted>1</ns3:numFilterRulesDeleted>
</ns3:deleteFilterRulesResponse>
</env:Body>
</env:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.endeca.com/MDEX/transaction/1/0">
<soapenv:Header/>
<soapenv:Body>
<ns:commitOuterTransaction>
<ns:OuterTransactionId>50</ns:OuterTransactionId>
</ns:commitOuterTransaction>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<transaction:commitOuterTransactionResponse xmlns:transaction="http://www.endeca.com/MDEX/transaction/1/0">
<Committed xmlns="http://www.endeca.com/MDEX/transaction/1/0">true</Committed>
<OuterTransactionId xmlns="http://www.endeca.com/MDEX/transaction/1/0">50</OuterTransactionId>
</transaction:commitOuterTransactionResponse>
</soapenv:Body>
</soapenv:Envelope>
この手順ではレコード属性のPDRは削除されないことに注意してください。PDRはあまりメモリーを消費しないため、Dgraph内に残しておくと後でコレクションを再構築する場合にソース・レコードを再収集しやすくなります。それでも、必要に応じて検索インタフェースおよび属性グループをチェックし、使用しなくなった属性を削除してください。
Oracle Endeca Server開発者ガイド · リリース7.6.0 · 2013年10月
Copyright (C) 2003, 2013, Oracle and/or its affiliates.All rights reserved.
