createCollection

Available for: Search Engine Server

Task: This command creates a new collection.

Syntax

createCollection collectionName [switchable]

Function parameters

  • collectionName: The name of the collection to be created. The name must be a valid file name. A collection with this name, whether switchable or not, must not already exist.

  • switchable: The value can be 0 or 1. It determines whether the collection to be created is to be switchable (1) or not (0, the default). In conjunction with the incremental export, i.e. when using the Search Server together with the Template Engine you require switchable collections. Non-switchable collections are meant to be used only with content that is exported statically.

Return value: If the command has been be executed successfully it returns the name of the collection created.

Additional Information

  • The names of the default collections are cm-contents (editorial system) and live-docs (live system). The Search Engine Server creates these collections automatically at startup if no collections exist.

  • The style files used for creation are located in the config/vdk/style directory. If, however, this directory contains a directory named like the collection to be created, then the style files in this directory will be used. These files are copied to the style directory below the corresponding collection directory.

Example

SES>createCollection sportsNews
sportsNews