レコードの初期ロードの使用例では、Oracle Endeca Serverで作成された空のデータ・ドメインにレコードをロードすることを想定しています。
初期データ・ロードは、1つ以上のrecordを指定するデータ・インジェストWebサービスのingestChanges操作をaddRecordsを使用して1回以上起動することで実行されます。
<attribute name="pKey" type="mdex:string">pKeyValue</attribute>pKeyは主キー属性の名前(partIDなど)で、pKeyValueは追加するレコードの主キーの値(P775など)です。
<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:addRecords> <ns:record> <ns1:attribute name="mdex-property_Key" type="mdex:string">partID</ns1:attribute> <ns1:attribute name="mdex-property_DisplayName" type="mdex:string">Part ID</ns1:attribute> <ns1:attribute name="mdex-property_Type" type="mdex:string">mdex:string</ns1:attribute> <ns1:attribute name="mdex-property_Language" type="mdex:string">en</ns1:attribute> <ns1:attribute name="mdex-property_IsSingleAssign" type="mdex:boolean">false</ns1:attribute> <ns1:attribute name="mdex-property_IsUnique" type="mdex:boolean">true</ns1:attribute> <ns1:attribute name="mdex-property_IsTextSearchable" type="mdex:boolean">false</ns1:attribute> <ns1:attribute name="mdex-property_TextSearchAllowsWildcards" type="mdex:boolean"> false</ns1:attribute> <ns1:attribute name="mdex-property_IsPropertyValueSearchable" type="mdex:boolean"> true</ns1:attribute> <ns1:attribute name="system-navigation_Select" type="mdex:string">single</ns1:attribute> <ns1:attribute name="system-navigation_Sorting" type="mdex:string">lexical</ns1:attribute> <ns1:attribute name="system-navigation_ShowRecordCounts" type="mdex:boolean">true</ns1:attribute> <ns1:attribute name="system-property_GroupMembership" type="mdex:string"> system_properties</ns1:attribute> </ns:record> <ns:record> <ns1:attribute name="partID" type="mdex:string">P789</ns1:attribute> <ns1:attribute name="modelNum" type="mdex:int">2562</ns1:attribute> <ns1:attribute name="location" type="mdex:geocode">42.365615 -71.075647</ns1:attribute> </ns:record> </ns:addRecords> </ns:ingestChanges></soapenv:Body></soapenv:Envelope>
このリクエストでは、最初にpartID主キー属性を作成してから、主キーpartID=P789を使用して1つの新規レコードをデータ・ドメインに追加します。また、このリクエストでは、2つの標準属性(modelNumおよびlocation)も作成されます(それらがデータ・ドメインに存在しないため)。
空のデータ・ドメインにレコードをロードするには、次の手順を実行します。
<ingest:ingestChangesResponse xmlns:ingest="http://www.endeca.com/MDEX/ingest/3/0"> <ingest:numPropertiesCreated>2</ingest:numPropertiesCreated> <ingest:numRecordsAffected>1</ingest:numRecordsAffected> <ingest:numRecordsDeleted>0</ingest:numRecordsDeleted> </ingest:ingestChangesResponse>