Loading TOC...

MarkLogic Server 11.0 Product Documentation
xdmp:forest-counts

xdmp:forest-counts(
   $forest-id as xs:unsignedLong*,
   [$show-elements as xs:string*],
   [$options as xs:string*]
) as element(forest-counts)*

Summary

Returns detailed forest statistics for a given forest . This built-in may require significantly more processing time than xdmp:forest-status .

Parameters
forest-id A sequence of forest IDs.
show-elements The names of elements to be returned (the element names are listed in the Usage Notes below). Only the top-level elements that show counts are allowed (for example, stands-counts or document-count). The function will only perform the computations necessary to return the nodes specified. If this parameter is not specified or is the empty sequence, then all statistics are calculated and returned for the forest. For each element name, you can specify a trailing * for wildcard matching. Specifying a * with no other text forces all calculations and returns all of the nodes.
options

Options include:

"preview-reindexer"
return elements associated with reindexing even if the reindexer is not running.
"preview-rebalancer"
return elements associated with rebalancing even if the rebalancer is not running.
NOTE: these two options apply only when "show-elements" is empty.

Required Privileges

http://marklogic.com/xdmp/privileges/counts

Usage Notes

The structure of the data returned is as follows:

forest-id

The unique key of the forest.

forest-name

The forest name.

current-time

The current time.

error

The error in processing forest status.

rebalancer-error

The error in rebalancing.

stands-counts

The counts of stands.

This is a complex element with the following element children:

stand-counts

The stand's counts.

This is a complex element with the following element children:

stand-id

The unique key of a stand.

path

The path of the stand.

active-fragment-count

The number of fragments.

nascent-fragment-count

The number of nascent fragments.

deleted-fragment-count

The number of deleted fragments.

document-count

The number of documents in the forest.

directory-count

The number of directories in the forest.

all-query-rolesets-fragment-count

The number of fragments indexed with each query-rolesets.

This is a complex element with the following element children:

query-rolesets-fragment-count

The number of fragments indexed with this query-rolesets.

This is a complex element with the following element children:

query-rolesets-id

The unique key of a query-rolesets.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-refragment-fragment-count

The number of fragments that need to be reindexed or refragmented.

reindex-refragment-rate

The rate of reindexing/refragmenting.

forced-reindex-fragment-count

The number of fragments that need to be reindexed due for forced reindexing.

reindex-fragment-count

The number of fragments that need to be reindexed.

reindex-previous-versions-count

The number of fragments that need previous versions (used with point-in-time queries) reindexed.

reindex-stemmed-searches-count

The number of fragments that need basic stemmed search reindexed.

reindex-word-searches-count

The number of fragments that need word searches reindexed.

reindex-one-character-searches-count

The number of fragments that need one-character searches reindexed.

reindex-two-character-searches-count

The number of fragments that need two-character searches reindexed.

reindex-three-character-searches-count

The number of fragments that need three-character searches reindexed.

reindex-fast-phrase-searches-count

The number of fragments that need fast phrase searches reindexed.

reindex-fast-case-sensitive-searches-count

The number of fragments that need fast case-sensitive searches reindexed.

reindex-fast-element-word-searches-count

The number of fragments that need element word searches reindexed.

reindex-fast-element-phrase-searches-count

The number of fragments that need element phrase searches reindexed.

reindex-fast-element-character-searches-count

The number of fragments that need element character searches reindexed.

reindex-fast-element-trailing-wildcard-searches-count

The number of fragments that need element trailing wildcard searches reindexed.

reindex-word-positions-count

The number of fragments that need word positions reindexed.

reindex-scaled-log-tf-normalization-count

The number of fragments that scaled log-tf normalization reindexed.

reindex-unscaled-log-tf-normalization-count

The number of fragments that unscaled log-tf normalization reindexed.

reindex-element-word-positions-count

The number of fragments that need element word positions reindexed.

reindex-element-value-positions-count

The number of fragments that need element value positions reindexed.

reindex-attribute-value-positions-count

The number of fragments that need attribute value positions reindexed.

reindex-field-value-searches-count

The number of fragments that need field value searches reindexed.

reindex-field-value-positions-count

The number of fragments that need field value positions reindexed.

reindex-three-character-word-positions-count

The number of fragments that need three character word positions reindexed.

reindex-triple-index-count

The number of fragments that need triples reindexed.

reindex-triple-positions-count

The number of fragments that need triple positions reindexed.

reindex-trailing-wildcard-searches-count

The number of fragments that need trailing wildcard searches reindexed.

reindex-trailing-wildcard-word-positions-count

The number of fragments that need trailing wildcard word positions reindexed.

reindex-fast-diacritic-sensitive-searches-count

The number of fragments that need fast diacritic-sensitive searches reindexed.

reindex-word-lexicon-count

The number of fragments that need the word lexicon reindexed.

reindex-binary-threshold-count

The number of binary fragments that need to be reindexed for size threshold.

reindex-deleted-stemmed-searches-count

The number of fragments that need the stemmed search indexes deleted.

reindex-deleted-word-searches-count

The number of fragments that need the word search indexes deleted.

reindex-deleted-one-character-searches-count

The number of fragments that need the one-character search indexes deleted.

reindex-deleted-two-character-searches-count

The number of fragments that need the two-character search indexes deleted.

reindex-deleted-three-character-searches-count

The number of fragments that need the three-character search indexes deleted.

reindex-deleted-fast-phrase-searches-count

The number of fragments that need the fast phrase search indexes deleted.

reindex-deleted-fast-case-sensitive-searches-count

The number of fragments that need the fast case-sensitive search indexes deleted.

reindex-deleted-fast-element-word-searches-count

The number of fragments that need the element word search indexes deleted.

reindex-deleted-fast-element-phrase-searches-count

The number of fragments that need the element phrase search indexes deleted.

reindex-deleted-fast-element-character-searches-count

The number of fragments that need the element character search indexes deleted.

reindex-deleted-fast-element-trailing-wildcard-searches-count

The number of fragments that need the element trailing wildcard search indexes deleted.

reindex-deleted-word-positions-count

The number of fragments that need the word position indexes deleted.

reindex-deleted-element-word-positions-count

The number of fragments that need the element word position indexes deleted.

reindex-deleted-element-value-positions-count

The number of fragments that need the element value position indexes deleted.

reindex-deleted-field-value-searches-count

The number of fragments that need the field value search indexes deleted.

reindex-deleted-field-value-positions-count

The number of fragments that need the field value position indexes deleted.

reindex-deleted-attribute-value-positions-count

The number of fragments that need the attribute value position indexes deleted.

reindex-deleted-three-character-word-positions-count

The number of fragments that need the three-character word position indexes deleted.

reindex-deleted-triple-index-count

The number of fragments that need deleted triples reindexed.

reindex-deleted-triple-positions-count

The number of fragments that need deleted triple positions reindexed.

reindex-deleted-trailing-wildcard-searches-count

The number of fragments that need the trailing wildcard search indexes deleted.

reindex-deleted-trailing-wildcard-word-positions-count

The number of fragments that need the trailing wildcard word position indexes deleted.

reindex-deleted-fast-diacritic-sensitive-searches-count

The number of fragments that need the diacritic-sensitive search indexes deleted.

reindex-uri-lexicon-count

The number of fragments that need the URI lexicon reindexed.

reindex-deleted-uri-lexicon-count

The number of fragments that need the URI lexicons deleted.

reindex-collection-lexicon-count

The number of fragments that need the collection lexicon reindexed.

reindex-deleted-collection-lexicon-count

The number of fragments that need the collection lexicons deleted.

reindex-element-word-query-throughs

The reindexing of word query throughs.

This is a complex element with the following element children:

reindex-element-word-query-through

The reindexing of an element word query through.

This is a complex element with the following element children:

namespace-uri

A namespace URI.

localname

One or more localnames.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-phrase-throughs

The reindexing of phrase throughs.

This is a complex element with the following element children:

reindex-phrase-through

The reindexing of a phrase through.

This is a complex element with the following element children:

namespace-uri

A namespace URI.

localname

One or more localnames.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-phrase-arounds

The reindexing of phrase arounds.

This is a complex element with the following element children:

reindex-phrase-around

The reindexing of a phrase around.

This is a complex element with the following element children:

namespace-uri

A namespace URI.

localname

One or more localnames.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-range-element-indexes

The reindexing of range element-indexes.

This is a complex element with the following element children:

reindex-range-element-index

The reindexing of a range element index.

This is a complex element with the following element children:

namespace-uri

A namespace URI.

localname

One or more localnames.

scalar-type

The scalar type of a range index.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-range-field-indexes

The reindexing of range field-indexes.

This is a complex element with the following element children:

reindex-range-field-index

The reindexing of a range field index.

This is a complex element with the following element children:

field-name

The field name.

scalar-type

The scalar type of a range index.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-range-path-indexes

The reindexing of range path-indexes.

This is a complex element with the following element children:

reindex-range-path-index

The reindexing of a range path index.

This is a complex element with the following element children:

path-expression

The path expression.

scalar-type

The scalar type of a range index.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-range-element-attribute-indexes

The reindexing of range element attribute indexes.

This is a complex element with the following element children:

reindex-range-element-attribute-index

The reindexing of a range element attribute index.

This is a complex element with the following element children:

parent-namespace-uri

A namespace URI.

parent-localname

One or more localnames.

namespace-uri

A namespace URI.

localname

One or more localnames.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-deleted-range-indexes

The reindexing of removed range indexes.

This is a complex element with the following element children:

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-element-word-lexicons

The reindexing of element word lexicons.

This is a complex element with the following element children:

reindex-element-word-lexicon

The reindexing of an element word lexicon.

This is a complex element with the following element children:

namespace-uri

A namespace URI.

localname

One or more localnames.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-element-attribute-word-lexicons

The reindexing of element attribute word lexicons.

This is a complex element with the following element children:

reindex-element-attribute-word-lexicon

The reindexing of an element attribute word lexicon.

This is a complex element with the following element children:

parent-namespace-uri

A namespace URI.

parent-localname

One or more localnames.

namespace-uri

A namespace URI.

localname

One or more localnames.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-all-deleted-word-lexicons

The reindexing of removed word lexicons.

This is a complex element with the following element children:

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-geospatial-element-indexes

The reindexing of geospatial element indexes.

This is a complex element with the following element children:

reindex-geospatial-element-index

The reindexing of a geospatial element index.

This is a complex element with the following element children:

namespace-uri

A namespace URI.

localname

One or more localnames.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-geospatial-element-child-indexes

The reindexing of geospatial element child indexes.

This is a complex element with the following element children:

reindex-geospatial-element-child-index

The reindexing of a geospatial element child index.

This is a complex element with the following element children:

parent-namespace-uri

A namespace URI.

parent-localname

One or more localnames.

namespace-uri

A namespace URI.

localname

One or more localnames.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-geospatial-element-pair-indexes

The reindexing of geospatial element pair indexes.

This is a complex element with the following element children:

reindex-geospatial-element-pair-index

The reindexing of a geospatial element pair index.

This is a complex element with the following element children:

parent-namespace-uri

A namespace URI.

parent-localname

One or more localnames.

latitude-namespace-uri

A namespace URI.

latitude-localname

One or more localnames.

longitude-namespace-uri

A namespace URI.

longitude-localname

One or more localnames.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-geospatial-element-attribute-pair-indexes

The reindexing of geospatial element indexes.

This is a complex element with the following element children:

reindex-geospatial-element-attribute-pair-index

The reindexing of a geospatial element attribute pair index.

This is a complex element with the following element children:

parent-namespace-uri

A namespace URI.

parent-localname

One or more localnames.

latitude-namespace-uri

A namespace URI.

latitude-localname

One or more localnames.

longitude-namespace-uri

A namespace URI.

longitude-localname

One or more localnames.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-geospatial-region-indexes

The reindexing of geospatial region indexes.

This is a complex element with the following element children:

reindex-geospatial-region-index

The reindexing of a geospatial region index.

This is a complex element with the following element children:

path-expression

The path expression.

coordinate-system

A coordinate system name.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-deleted-geospatial-region-indexes

The reindexing of removed geospatial region indexes.

This is a complex element with the following element children:

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-protected-paths

The reindexing of protected paths.

This is a complex element with the following element children:

reindex-protected-path

The reindexing of a protected path.

This is a complex element with the following element children:

path-expression

The path expression.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-deleted-protected-paths

The reindexing of removed protected paths.

This is a complex element with the following element children:

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-tde-templates

The reindexing of TDE templates.

This is a complex element with the following element children:

reindex-tde-template

A reindexing of a TDE template.

This is a complex element with the following element children:

tde-template

A template.

reindex-fragment-count

The number of fragments that need to be reindexed.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

reindex-deleted-tde-templates

A reindexing of deleted TDE templates.

This is a complex element with the following element children:

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

refragment-document-count

The number of documents that need to be refragmented.

refragment-fragment-roots

The refragmenting of fragment roots.

This is a complex element with the following element children:

refragment-fragment-parent

The refragmenting of fragment parent.

This is a complex element with the following element children:

namespace-uri

A namespace URI.

localname

One or more localnames.

refragment-document-count

The number of documents that need to be refragmented.

document-count

The number of documents in the forest.

refragment-fragment-parents

The refragmenting of fragment parents.

This is a complex element with the following element children:

refragment-fragment-parent

The refragmenting of fragment parent.

This is a complex element with the following element children:

namespace-uri

A namespace URI.

localname

One or more localnames.

refragment-document-count

The number of documents that need to be refragmented.

document-count

The number of documents in the forest.

refragment-new-fields

The refragmenting of new fields.

This is a complex element with the following element children:

refragment-new-field

The refragmenting of a new field.

This is a complex element with the following element children:

field-name

The field name.

refragment-document-count

The number of documents that need to be refragmented.

document-count

The number of documents in the forest.

refragment-modified-fields

The refragmenting of modifiedfields.

This is a complex element with the following element children:

refragment-modified-field

The refragmenting of a new field.

This is a complex element with the following element children:

field-name

The field name.

refragment-document-count

The number of documents that need to be refragmented.

document-count

The number of documents in the forest.

refragment-removed-configurations

Refragmenting old fragment root/parent settings

This is a complex element with the following element children:

refragment-document-count

The number of documents that need to be refragmented.

reindex-reverse-searches-fragment-count

The number of fragments that need to be reindexed for reverse searches.

rebalance-fragment-counts

The number of fragments that need to be rebalanced out.

This is a complex element with the following element children:

rebalance-fragment-count

A destination and the number of fragments that need to be rebalanced to this destination.

This is a complex element with the following element children:

rebalance-destination

The destination of the rebalancing operation.

fragment-count

The total number of fragments for a given reindexing or rebalancing activity.

rebalance-rate

The rate of rebalancing.

Example

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>
 

Example

(: 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>

 

Example

(: force everything to be calculated :)
xdmp:forest-counts(xdmp:forest("Documents"), "*")
=>
 the full output of xdmp:forest-counts

 

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