MarkLogic Server 11.0 Product Documentation
xdmp:plannable

xdmp:plannable(
   $expression as item()*
) as xs:boolean

Summary

Returns a boolean showing whether the given expression is suitable to use with xdmp:plan. Expressions that are fully searchable are "plannable"; that is, they will return query plan output when used with xdmp:plan.

Parameters
expression The expression to determine if it is plannable.

Usage Notes

Behaves the same as "Analyzing path for search" in xdmp:plan. When true is returned, the expression could be planned by xdmp:plan, otherwise the expression would throw an XDMP-UNSEARCHABLE exception when run in xdmp:plan.

Example

  xdmp:plannable(cts:search(fn:doc(),cts:word-query("cat")))
   => true

Example

  xdmp:plannable(/foo/descendant::bar="baz")
   => false
Powered by MarkLogic Server | Terms of Use | Privacy Policy