Skip to main content

Administrating MarkLogic Server

Testing the Validity of an Index Path Expression

You can use the XQuery function cts:valid-index-path to test whether or not an XPath expression can be used to define a path range index. To test validity, copy the following query into Query Console, modify it to use your path expression, and run it.

xquery version "1.0-ml";
cts:valid-index-path("/a/b", fn:true())

Use the second parameter to control whether or not to verify that namespace binding definitions are configured for namespace prefixes used in the path expression.