Adding a new data domain

You add a data domain with the endeca-cmd create-dd name command, where name is the name of your data domain. Running this command is equivalent to using the createDataDomain operation in the Manage Web Service request.

Before you can create a data domain on multiple Endeca Server nodes, the following conditions must be met:
Note: While you can use endeca-cmd create-dd command to create a new data domain, you cannot use this command for restoring a previously created data domain. To restore a previously created data domain based on its index, use the import-dd and export-dd commands.

To create a data domain:

  1. Use a command-line window (for example, open a Command Prompt in Windows) and navigate to the endeca-cmd directory.
  2. Use endeca-cmd list-dd-profiles --verbose or the equivalent operation in the Manage Web Service (listDataDomainProfiles), to obtain a list of all defined data domain profiles.

    The Endeca Server returns a list of all defined data domain profiles, including their characteristics, such as name, description, the number of data domain nodes, the number of processing threads for the Dgraph processes, the cache size, whether the data domain requires a dedicated leader node, and others. This list also includes the default data domain profile.

  3. Select the data domain profile from this list. You will use its name to create a data domain. You can also select default, which is the default data domain profile that always exists.
  4. Create a data domain using the command similar to the following example:
    endeca-cmd create-dd MyDD 
    --dd-profile-name test
    --is-enabled true
    where:
    • MyDD is the name of the data domain you are creating.
    • test is the name of the data domain profile that will be used.
    • --is-enabled true indicates that this data domain should be enabled once created.
    The name of the data domain follows these rules:
    • The name must be unique among any other Endeca data domains in this Endeca Server instance (or Endeca Server cluster).
    • The name cannot contain these characters: & (ampersand), | (pipe), ; (semicolon), \ (back slash), / (forward slash).
    • The name cannot start with "." (a period).
    • The name must be enclosed in double quotes if it contains spaces. Note that after being created, the name must be referenced within double quotes in subsequent commands.

    If the data domain profile exists (the default data domain profile always exists, but you may have created your own data domain profile), and the Endeca Server cluster has sufficient resources to host the new data domain, it is created.

    Alternatively, you can issue the request similar to the following example, with the Manage Web Service:
    <ns1:createDataDomain xmlns:ns1="http://www.endeca.com/endeca-server/manage/2/0">
        <ns1:name>MyDD</ns1:name>
        <ns1:ddProfileName>default</ns1:ddProfileName>
        <ns1:enabled>true</ns1:enabled>
    </ns1:createDataDomain>

    This example uses the default data domain profile that always exists in the Endeca Server cluster.

    As a result of creating a data domain, Endeca Server creates a .profile file associated with each new data domain and stores it in the index of the data domain. The file contains the configuration of the profile with which the data domain was created. If you later update the data domain, its .profile file is updated. When you export the data domain, the .profile file is exported. You do not need to specify this .profile file when updating, exporting, or importing. It is used automatically.

  5. To verify the data domain has been created successfully, issue one of these commands: endeca-cmd list-dd, or endeca-cmd get-dd name

    Alternatively, you can issue listDataDomains, or getDataDomain requests, using the Manage Web Service.

The following example illustrates the result of the getDataDomain operation. It lists the details of the successfully created data domain MyDD. This data domain uses the data domain profile for which additional arguments have been specified (as compared with the default data domain profile):
<ns3:getDataDomainResponse 
    xmlns:ns2="http://www.endeca.com/endeca-server/types/2/0" 
    xmlns:ns3="http://www.endeca.com/endeca-server/manage/2/0">
 <ns3:dataDomainDetail>
  <ns2:name>MyDD</ns2:name>
  <ns2:allowOversubscribe>true</ns2:allowOversubscribe>
  <ns2:allowQueriesOnLeader>true</ns2:allowQueriesOnLeader>
  <ns2:numFollowers>0</ns2:numFollowers>
  <ns2:readOnly>false</ns2:readOnly>
  <ns2:enabled>true</ns2:enabled>
  <ns2:numComputeThreads>4</ns2:numComputeThreads>
  <ns2:computeCacheSizeMB>0</ns2:computeCacheSizeMB>
  <ns2:startupTimeoutSeconds>600</ns2:startupTimeoutSeconds>
  <ns2:shutdownTimeoutSeconds>30</ns2:shutdownTimeoutSeconds>
  <ns2:sessionIdType>header</ns2:sessionIdType>
  <ns2:sessionIdKey>X-Endeca-Session-ID</ns2:sessionIdKey>
 </ns3:dataDomainDetail>
</ns3:getDataDomainResponse>