xdmp:plannable( $expression as item()* ) as xs:boolean
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. |
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
.
xdmp:plannable(cts:search(fn:doc(),cts:word-query("cat"))) => true
xdmp:plannable(/foo/descendant::bar="baz") => false