You can use the Configuration Web Service to load the schema (PDRs and DDRs) for your standard and managed attributes.
It is recommended to load your attribute schema before loading your source records, so that you can modify the resulting PDRs and DDRs as needed, without causing the Dgraph process to reindex the data set. After the PDRs and DDRs have been configured as desired, you can then use the Data Ingest Web Service to load your source records.
<config-service:configTransaction xmlns:config="http://www.endeca.com/MDEX/config/services/types/3/0" xmlns:mdex="http://www.endeca.com/MDEX/config/XQuery/2009/09"> <config-service:putProperties> <mdex:record> <mdex-property_Key>ProductID</mdex-property_Key> <mdex-property_DisplayName>Product ID</mdex-property_DisplayName> <mdex-property_IsSingleAssign>true</mdex-property_IsSingleAssign> <mdex-property_IsUnique>true</mdex-property_IsUnique> <mdex-property_IsTextSearchable>false</mdex-property_IsTextSearchable> <mdex-property_TextSearchAllowsWildcards>false</mdex-property_TextSearchAllowsWildcards> <mdex-property_IsPropertyValueSearchable>false</mdex-property_IsPropertyValueSearchable> <mdex-property_Type>mdex:int</mdex-property_Type> <mdex-property_Language>en</mdex-property_Language> </mdex:record> <mdex:record> <mdex-property_Key>BikeType</mdex-property_Key> <mdex-property_DisplayName>Bike Type</mdex-property_DisplayName> <mdex-property_IsSingleAssign>true</mdex-property_IsSingleAssign> <mdex-property_IsTextSearchable>true</mdex-property_IsTextSearchable> <mdex-property_IsUnique>false</mdex-property_IsUnique> <mdex-property_TextSearchAllowsWildcards>true</mdex-property_TextSearchAllowsWildcards> <mdex-property_IsPropertyValueSearchable>true</mdex-property_IsPropertyValueSearchable> <mdex-property_Type>mdex:string</mdex-property_Type> <mdex-property_Language>en</mdex-property_Language> </mdex:record> </config-service:putProperties> <config-service:putDimensions> <mdex:record> <mdex-dimension_Key>BikeType</mdex-dimension_Key> <mdex-dimension_EnableRefinements>true</mdex-dimension_EnableRefinements> <mdex-dimension_IsDimensionSearchHierarchical>true</mdex-dimension_IsDimensionSearchHierarchical> <mdex-dimension_IsRecordSearchHierarchical>true</mdex-dimension_IsRecordSearchHierarchical> </mdex:record> </config-service:putDimensions> </config-service:configTransaction>
First, the example uses putProperties to create two standard attributes (ProductID and BikeType). The ProductID attribute is configured as a single-assign, unique attribute, so that it can be used as a primary key for records. The BikeType attribute is the standard attribute record used for the creation of the BikeType managed attribute. Next, this example uses putDimensions to create the BikeType managed attribute.
To load an attribute schema into the Endeca data domain:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <config-types:results xmlns:config-types="http://www.endeca.com/MDEX/config/services/types/3/0"/> </soapenv:Body> </soapenv:Envelope>