Creating attribute groups

You can use the Configuration Web Service to create attribute groups.

The putGroups operation creates one or more attribute groups. For example, this request illustrates how to create an attribute group named Ratings that has three standard attributes (PriceRange, ReviewScore, and Designation):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
   xmlns:ns="http://www.endeca.com/MDEX/config/services/types/3/0" 
   xmlns:ns1="http://www.endeca.com/MDEX/config/XQuery/2009/09">
 <soapenv:Header/>
  <soapenv:Body>
   <ns:configTransaction>
    <ns:putGroups>
      <ns1:group key="Ratings" displayName="Product Ratings">
       <mdex-property_Key>PriceRange</mdex-property_Key>
       <mdex-property_Key>ReviewScore</mdex-property_Key>
       <mdex-property_Key>Designation</mdex-property_Key>
      </ns1:group>
     </ns:putGroups>
    </ns:configTransaction>
  </soapenv:Body>
</soapenv:Envelope>

Keep in mind that the group name (the key attribute) must use an NCName format.

To create an attribute group in the Endeca data domain:

  1. Make sure that the Oracle Endeca Server and the data domain are running. Access the Configuration Web Service for the data domain: http://localhost:<port>/ws/config/dataDomain?wsdl.
  2. Make a SOAP request to the Configuration Web Service as shown above, indicating the key of the new group, and its display name. (Omit specifying other optional attributes because they are not used by the Endeca Server).
    If the request is successful, the response will look like this abbreviated example:
    <soapenv:Body>
     <config-types:results xmlns:config-types="http://www.endeca.com/MDEX/config/services/types/3/0"/>
    </soapenv:Body>
  3. Issue a request for listing groups, to verify that this group is included, as in the following example:
    <ns:configTransaction>
       xmlns:ns="http://www.endeca.com/MDEX/config/services/types/3/0"
       xmlns:ns1="http://www.endeca.com/MDEX/config/XQuery/2009/09">
    		  <ns:listGroups/>
    </ns:configTransaction>

    The response should include a Ratings group.