Learn R Programming

rfml (version 0.1.0)

ml.init.database: Set up a MarkLogic database for use with rfml.

Description

The function installs REST extensions and modules needed to use the package againts a MarkLogic Server database. The function needs to be executed once for each database that is going to be used with rfml. It also creates a document, /rfml/rfmlInfo.json, that stores the version of the rfml package and the date the database are initiated.

Usage

ml.init.database(host = "localhost", port = "8000", adminuser = "admin", password = "admin")

Arguments

host
The hostname or ip-adress of the MarkLogic http server. Default to localhost.
port
The port number of the MarkLogic http server. 8000 is used default
adminuser
The username of a user that have rights to install options. admin is default.
password
The password admin is default.

Value

Nothing if success or raise a error.

Details

The database must have a REST server and a module database. It also adds a document, /rfml/rfmlInfo.json, that stores the version of the rfml package and the date the database are initiated.

The user that is used for the function need to have the rest-admin role, or at least the following privileges:

  • http://marklogic.com/xdmp/privileges/rest-admin
  • http://marklogic.com/xdmp/privileges/rest-writer
  • http://marklogic.com/xdmp/privileges/rest-reader

Examples

Run this code
## Not run: 
# ml.init.database("localhost", "8000", "admin", "admin")
# ## End(Not run)

Run the code above in your browser using DataLab