Loading TOC...

MarkLogic 10 Product Documentation
xdmp:get-server-field

xdmp:get-server-field(
   $name as xs:string,
   [$default as item()*]
) as item()*

Summary

Returns the value of a named server field. A server field is created with xdmp:set-server-field and stores a name/value pair in memory. The server field is available on the App Server in which it is set on the host in which the App Server runs, via xdmp:get-server-field ; a server field that is set on one App Server is not available on other App Servers on that host or on the same App Server running on another host. Server fields are commonly used with the system Plugin Framework.

Parameters
name The name of the server field.
default A default value to return if there is no server field.

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-get-server-field

Example

xdmp:get-server-field("foo")
=> "bar"

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.