Before you add a new record, a record must have a unique assignment from a primary-key attribute.
When you add a new record with the Data Ingest Web Service, the service checks that the primary-key attribute already exists in the Endeca data domain. Therefore, if you have an empty data domain, before adding any records, you need to identify which attribute in your records is going to serve as the primary-key attribute, and add its PDR to the data domain.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.endeca.com/MDEX/ingest/2/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">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/2/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>
If you specify a non-existent attribute as the primary key, the standard attribute is automatically created by the Data Ingest Web Service.
PDR property | Default setting |
---|---|
mdex-property_Key | Set to the name specified in the request. |
mdex-property_Type | Set to the Dgraph property type specified in the request. If no property type was specified, defaults to an mdex:string type. |
mdex-property_Language | Set to a supported language ID. Defaults to either unknown or to the language ID set by the Configuration Web Service's setPropertyDefaultLanguage operation. |
mdex-property_IsPropertyValueSearchable | true (the attribute is enabled for value search) |
mdex-property_IsSingleAssign | false (a record may have more than one value for the attribute) |
mdex-property_IsTextSearchable | false (the attribute is disabled for record search) |
mdex-property_IsUnique | true (a value may be assigned to at most one record) |
mdex-property_TextSearchAllowsWildcards | false (wildcard search is disabled for this attribute) |
system-navigation_Select | single (allows selecting only one refinement from this attribute) |
system-navigation_ShowRecordCounts | true (record counts are shown for a refinement) |
system-navigation_Sorting | record-count (refinements are sorted in descending order, by the number of records available for each refinement) |