新規レコードを追加する前に、レコードに主キー属性を一意に割り当てる必要があります。
データ・インジェストWebサービスで新規レコードを追加する際、Endecaデータ・ドメインに主キー属性がすでに存在するかどうかの確認が行われます。空のデータ・ドメインを使用している場合は、レコードを追加する前に、レコード内で主キー属性として機能させる属性を指定し、そのPDRをデータ・ドメインに追加する必要があります。
<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">true</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">record-count</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:addRecords> </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:addRecords> <ns:record> <ns1:attribute name="partID" type="mdex:string">P123</ns1:attribute> </ns:record> </ns:addRecords> </ns:ingestChanges> </soapenv:Body> </soapenv:Envelope>
存在しない属性を主キーとして指定すると、データ・インジェストWebサービスによって標準属性が自動的に作成されます。
PDRプロパティ | デフォルト設定 |
---|---|
mdex-property_Key | リクエストに指定された名前に設定されます。 |
mdex-property_Type | リクエストに指定されたDgraphプロパティ・タイプに設定されます。プロパティ・タイプが指定されていない場合、デフォルトでmdex:stringタイプに設定されます。 |
mdex-property_Language | サポートされる言語IDに設定されます。デフォルトではunknownまたは構成WebサービスのsetPropertyDefaultLanguage操作によって設定される言語IDのいずれかに設定されます。 |
mdex-property_IsPropertyValueSearchable | true (属性は値検索で有効です)。 |
mdex-property_IsSingleAssign | false (レコードは属性の複数の値を保持できます)。 |
mdex-property_IsTextSearchable | false (属性はレコード検索で無効です)。 |
mdex-property_IsUnique | true (値を複数のレコードに割り当てることはできません)。 |
mdex-property_TextSearchAllowsWildcards | false (ワイルドカード検索はこの属性で無効です)。 |
system-navigation_Select | single (この属性から絞込みを1つだけ選択できます)。 |
system-navigation_ShowRecordCounts | true (絞込みに対してレコード数が表示されます)。 |
system-navigation_Sorting | record-count (絞込みは、絞込みごとに使用できるレコード数別に、降順でソートされます)。 |