Loading TOC...

MarkLogic 12 EA 2 Product Documentation
xdmp:query-partitions

xdmp:query-partitions(
   $query as cts:query
) as xs:unsigned*

Summary

This function returns the partition numbers of the partitions that the specified query will be searched on.

Parameters
query A query.

Example

xdmp:query-partitions(
  cts:element-range-query(xs:QName("create-time"), ">=", xs:yearMonthDuration("P1Y"))
)
  =>
    1

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