
xdmp:forest-counts( $forest-id as xs:unsignedLong*, [$show-elements as xs:string*], [$options as xs:string*] ) as element(forest-counts)*
Returns detailed forest statistics for a given forest
.
This built-in may require significantly more processing
time than xdmp:forest-status
.
http://marklogic.com/xdmp/privileges/counts
The structure of the data returned is as follows:
forest-idforest-namecurrent-timeerrorrebalancer-errorstands-countsThis is a complex element with the following element children:
stand-countsThis is a complex element with the following element children:
stand-idpathactive-fragment-countnascent-fragment-countdeleted-fragment-countdocument-countdirectory-countall-query-rolesets-fragment-countThis is a complex element with the following element children:
query-rolesets-fragment-countThis is a complex element with the following element children:
query-rolesets-idfragment-countreindex-refragment-fragment-countreindex-refragment-rateforced-reindex-fragment-countreindex-fragment-countreindex-previous-versions-countreindex-stemmed-searches-countreindex-word-searches-countreindex-one-character-searches-countreindex-two-character-searches-countreindex-three-character-searches-countreindex-fast-phrase-searches-countreindex-fast-case-sensitive-searches-countreindex-fast-element-word-searches-countreindex-fast-element-phrase-searches-countreindex-fast-element-character-searches-countreindex-fast-element-trailing-wildcard-searches-countreindex-word-positions-countreindex-scaled-log-tf-normalization-countreindex-unscaled-log-tf-normalization-countreindex-element-word-positions-countreindex-element-value-positions-countreindex-attribute-value-positions-countreindex-field-value-searches-countreindex-field-value-positions-countreindex-three-character-word-positions-countreindex-triple-index-countreindex-triple-positions-countreindex-trailing-wildcard-searches-countreindex-trailing-wildcard-word-positions-countreindex-fast-diacritic-sensitive-searches-countreindex-word-lexicon-countreindex-binary-threshold-countreindex-deleted-stemmed-searches-countreindex-deleted-word-searches-countreindex-deleted-one-character-searches-countreindex-deleted-two-character-searches-countreindex-deleted-three-character-searches-countreindex-deleted-fast-phrase-searches-countreindex-deleted-fast-case-sensitive-searches-countreindex-deleted-fast-element-word-searches-countreindex-deleted-fast-element-phrase-searches-countreindex-deleted-fast-element-character-searches-countreindex-deleted-fast-element-trailing-wildcard-searches-countreindex-deleted-word-positions-countreindex-deleted-element-word-positions-countreindex-deleted-element-value-positions-countreindex-deleted-field-value-searches-countreindex-deleted-field-value-positions-countreindex-deleted-attribute-value-positions-countreindex-deleted-three-character-word-positions-countreindex-deleted-triple-index-countreindex-deleted-triple-positions-countreindex-deleted-trailing-wildcard-searches-countreindex-deleted-trailing-wildcard-word-positions-countreindex-deleted-fast-diacritic-sensitive-searches-countreindex-uri-lexicon-countreindex-deleted-uri-lexicon-countreindex-collection-lexicon-countreindex-deleted-collection-lexicon-countreindex-element-word-query-throughsThis is a complex element with the following element children:
reindex-element-word-query-throughThis is a complex element with the following element children:
namespace-urilocalnamereindex-fragment-countfragment-countreindex-phrase-throughsThis is a complex element with the following element children:
reindex-phrase-throughThis is a complex element with the following element children:
namespace-urilocalnamereindex-fragment-countfragment-countreindex-phrase-aroundsThis is a complex element with the following element children:
reindex-phrase-aroundThis is a complex element with the following element children:
namespace-urilocalnamereindex-fragment-countfragment-countreindex-range-element-indexesThis is a complex element with the following element children:
reindex-range-element-indexThis is a complex element with the following element children:
namespace-urilocalnamescalar-typereindex-fragment-countfragment-countreindex-range-field-indexesThis is a complex element with the following element children:
reindex-range-field-indexThis is a complex element with the following element children:
field-namescalar-typereindex-fragment-countfragment-countreindex-range-path-indexesThis is a complex element with the following element children:
reindex-range-path-indexThis is a complex element with the following element children:
path-expressionscalar-typereindex-fragment-countfragment-countreindex-range-element-attribute-indexesThis is a complex element with the following element children:
reindex-range-element-attribute-indexThis is a complex element with the following element children:
parent-namespace-uriparent-localnamenamespace-urilocalnamereindex-fragment-countfragment-countreindex-deleted-range-indexesThis is a complex element with the following element children:
fragment-countreindex-element-word-lexiconsThis is a complex element with the following element children:
reindex-element-word-lexiconThis is a complex element with the following element children:
namespace-urilocalnamereindex-fragment-countfragment-countreindex-element-attribute-word-lexiconsThis is a complex element with the following element children:
reindex-element-attribute-word-lexiconThis is a complex element with the following element children:
parent-namespace-uriparent-localnamenamespace-urilocalnamereindex-fragment-countfragment-countreindex-all-deleted-word-lexiconsThis is a complex element with the following element children:
fragment-countreindex-geospatial-element-indexesThis is a complex element with the following element children:
reindex-geospatial-element-indexThis is a complex element with the following element children:
namespace-urilocalnamereindex-fragment-countfragment-countreindex-geospatial-element-child-indexesThis is a complex element with the following element children:
reindex-geospatial-element-child-indexThis is a complex element with the following element children:
parent-namespace-uriparent-localnamenamespace-urilocalnamereindex-fragment-countfragment-countreindex-geospatial-element-pair-indexesThis is a complex element with the following element children:
reindex-geospatial-element-pair-indexThis is a complex element with the following element children:
parent-namespace-uriparent-localnamelatitude-namespace-urilatitude-localnamelongitude-namespace-urilongitude-localnamereindex-fragment-countfragment-countreindex-geospatial-element-attribute-pair-indexesThis is a complex element with the following element children:
reindex-geospatial-element-attribute-pair-indexThis is a complex element with the following element children:
parent-namespace-uriparent-localnamelatitude-namespace-urilatitude-localnamelongitude-namespace-urilongitude-localnamereindex-fragment-countfragment-countreindex-geospatial-region-indexesThis is a complex element with the following element children:
reindex-geospatial-region-indexThis is a complex element with the following element children:
path-expressioncoordinate-systemreindex-fragment-countfragment-countreindex-deleted-geospatial-region-indexesThis is a complex element with the following element children:
fragment-countreindex-protected-pathsThis is a complex element with the following element children:
reindex-protected-pathThis is a complex element with the following element children:
path-expressionreindex-fragment-countfragment-countreindex-deleted-protected-pathsThis is a complex element with the following element children:
fragment-countreindex-tde-templatesThis is a complex element with the following element children:
reindex-tde-templateThis is a complex element with the following element children:
tde-templatereindex-fragment-countfragment-countreindex-deleted-tde-templatesThis is a complex element with the following element children:
fragment-countrefragment-document-countrefragment-fragment-rootsThis is a complex element with the following element children:
refragment-fragment-parentThis is a complex element with the following element children:
namespace-urilocalnamerefragment-document-countdocument-countrefragment-fragment-parentsThis is a complex element with the following element children:
refragment-fragment-parentThis is a complex element with the following element children:
namespace-urilocalnamerefragment-document-countdocument-countrefragment-new-fieldsThis is a complex element with the following element children:
refragment-new-fieldThis is a complex element with the following element children:
field-namerefragment-document-countdocument-countrefragment-modified-fieldsThis is a complex element with the following element children:
refragment-modified-fieldThis is a complex element with the following element children:
field-namerefragment-document-countdocument-countrefragment-removed-configurationsThis is a complex element with the following element children:
refragment-document-countreindex-reverse-searches-fragment-countrebalance-fragment-countsThis is a complex element with the following element children:
rebalance-fragment-countThis is a complex element with the following element children:
rebalance-destinationfragment-countrebalance-rate
xdmp:forest-counts(xdmp:forest("Documents"))
=>
<forest-counts xmlns="http://marklogic.com/xdmp/status/forest">
<forest-id>12434840716430044697</forest-id>
<current-time>2007-02-16T19:00:00.708-08:00</current-time>
<stands-counts>
<stand-counts>
<stand-id>15174447282968484759</stand-id>
<path>c:\Program Files\MarkLogic\Data\Forests\Documents\00000016</path>
<active-fragment-count>146</active-fragment-count>
<nascent-fragment-count>0</nascent-fragment-count>
<deleted-fragment-count>0</deleted-fragment-count>
</stand-counts>
</stands-counts>
<document-count>67</document-count>
<directory-count>3</directory-count>
</forest-counts>
(: only calculate the document count :)
xdmp:forest-counts(xdmp:forest("Documents"), ("document-count"))
=>
<forest-counts xmlns="http://marklogic.com/xdmp/status/forest">
<forest-id>11656884323633926637</forest-id>
<forest-name>Documents</forest-name>
<current-time>2008-03-18T16:22:34.082-07:00</current-time>
<document-count>1070</document-count>
</forest-counts>
(: force everything to be calculated :)
xdmp:forest-counts(xdmp:forest("Documents"), "*")
=>
the full output of xdmp:forest-counts
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.