Skip to main content

Securing MarkLogic Server

Run the Example Queries

This section includes examples in both XQuery and JavaScript. Run the following queries in the Query Console. For simplicity, the sample queries use xdmp:eval() and xdmp:get-current-user() (or xdmp.eval() and xdmp.getCurrentUser()) to execute a query in the context of each user. Different elements and properties in a document are concealed for the different roles. Notice the different types of queries, using either XQuery or JavaScript, that are used to search for content.

Note

These examples assume that you have access permissions for both the MarkLogic Server Admin Interface and the Query Console.