Skip to main content

Administrating MarkLogic Server

Creating an Amp

To create an amp, follow these steps:

  1. Click the Security icon in the left tree menu.

  2. Click the Amps icon.

  3. Click the Create tab. The Amp Configuration page appears.

  4. Enter the local name of the function (without parentheses) in which the amp takes effect. For example: my-function.

  5. Enter the namespace in which the function is defined.

  6. Enter the document URI for the document in which the function is defined:

    • If, in the following step, database is set to filesystem, then this document URI must begin with a forward slash (for example, /amped-functions.xqy). The specified document must be placed in the Modules directory within the installation path. For example, if /mydir/my-amps.xqy is specified in the document uri, my-amps.xqy must be placed in installation-directory/Modules/mydir.

    • If, in the following step, database is set to any other database, then this document URI must match an existing module in that database.

  7. Enter the database in which the function is stored. If the function is stored in the Modules directory on the filesystem, set the database to filesystem (which is the default value).

  8. Under the roles section, select the additional roles that will be given to the user while the user is executing the function.

  9. Click OK.

The amp is now added to the security database.