marklogic Working with fn:count, xdmp:estimate and cts:frequency Using xdmp:estimate() to get the number of matching documents


Example

xdmp:estimate(cts:search(fn:doc(), cts:element-value-query(xs:QName("d"), "fragment-d")))

xdmp:estimate can not be used on XPaths unlike fn:count is used in previous example

xdmp:estimate actually gives the number of matching fragments