Loading TOC...

xdmp.forestCounts

xdmp.forestCounts(
   $forest-id as String[],
   [$show-elements as String[]],
   [$options as String[]]
) as Sequence

Summary

Returns detailed forest statistics for a given forest as a Sequence of ObjectNodes. 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:

forestId

The unique key of the forest.

forestName

The forest name.

currentTime

The current time.

error

The error in processing forest status.

rebalancerError

The error in rebalancing.

standsCounts

The counts of stands.

This is an object with the following properties:

standCounts

The stand's counts.

This is an object with the following properties:

standId

The unique key of a stand.

path

The path of the stand.

activeFragmentCount

The number of fragments.

nascentFragmentCount

The number of nascent fragments.

deletedFragmentCount

The number of deleted fragments.

documentCount

The number of documents in the forest.

directoryCount

The number of directories in the forest.

allQueryRolesetsFragmentCount

The number of fragments indexed with each query-rolesets.

This is an object with the following properties:

queryRolesetsFragmentCount

The number of fragments indexed with this query-rolesets.

This is an object with the following properties:

queryRolesetsId

The unique key of a query-rolesets.

fragmentCount

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

reindexRefragmentFragmentCount

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

reindexRefragmentRate

The rate of reindexing/refragmenting.

forcedReindexFragmentCount

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

reindexFragmentCount

The number of fragments that need to be reindexed.

reindexPreviousVersionsCount

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

reindexStemmedSearchesCount

The number of fragments that need basic stemmed search reindexed.

reindexWordSearchesCount

The number of fragments that need word searches reindexed.

reindexOneCharacterSearchesCount

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

reindexTwoCharacterSearchesCount

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

reindexThreeCharacterSearchesCount

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

reindexFastPhraseSearchesCount

The number of fragments that need fast phrase searches reindexed.

reindexFastCaseSensitiveSearchesCount

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

reindexFastElementWordSearchesCount

The number of fragments that need element word searches reindexed.

reindexFastElementPhraseSearchesCount

The number of fragments that need element phrase searches reindexed.

reindexFastElementCharacterSearchesCount

The number of fragments that need element character searches reindexed.

reindexFastElementTrailingWildcardSearchesCount

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

reindexWordPositionsCount

The number of fragments that need word positions reindexed.

reindexScaledLogTfNormalizationCount

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

reindexUnscaledLogTfNormalizationCount

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

reindexElementWordPositionsCount

The number of fragments that need element word positions reindexed.

reindexElementValuePositionsCount

The number of fragments that need element value positions reindexed.

reindexAttributeValuePositionsCount

The number of fragments that need attribute value positions reindexed.

reindexFieldValueSearchesCount

The number of fragments that need field value searches reindexed.

reindexFieldValuePositionsCount

The number of fragments that need field value positions reindexed.

reindexThreeCharacterWordPositionsCount

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

reindexTripleIndexCount

The number of fragments that need triples reindexed.

reindexTriplePositionsCount

The number of fragments that need triple positions reindexed.

reindexTrailingWildcardSearchesCount

The number of fragments that need trailing wildcard searches reindexed.

reindexTrailingWildcardWordPositionsCount

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

reindexFastDiacriticSensitiveSearchesCount

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

reindexWordLexiconCount

The number of fragments that need the word lexicon reindexed.

reindexBinaryThresholdCount

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

reindexDeletedStemmedSearchesCount

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

reindexDeletedWordSearchesCount

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

reindexDeletedOneCharacterSearchesCount

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

reindexDeletedTwoCharacterSearchesCount

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

reindexDeletedThreeCharacterSearchesCount

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

reindexDeletedFastPhraseSearchesCount

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

reindexDeletedFastCaseSensitiveSearchesCount

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

reindexDeletedFastElementWordSearchesCount

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

reindexDeletedFastElementPhraseSearchesCount

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

reindexDeletedFastElementCharacterSearchesCount

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

reindexDeletedFastElementTrailingWildcardSearchesCount

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

reindexDeletedWordPositionsCount

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

reindexDeletedElementWordPositionsCount

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

reindexDeletedElementValuePositionsCount

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

reindexDeletedFieldValueSearchesCount

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

reindexDeletedFieldValuePositionsCount

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

reindexDeletedAttributeValuePositionsCount

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

reindexDeletedThreeCharacterWordPositionsCount

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

reindexDeletedTripleIndexCount

The number of fragments that need deleted triples reindexed.

reindexDeletedTriplePositionsCount

The number of fragments that need deleted triple positions reindexed.

reindexDeletedTrailingWildcardSearchesCount

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

reindexDeletedTrailingWildcardWordPositionsCount

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

reindexDeletedFastDiacriticSensitiveSearchesCount

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

reindexUriLexiconCount

The number of fragments that need the URI lexicon reindexed.

reindexDeletedUriLexiconCount

The number of fragments that need the URI lexicons deleted.

reindexCollectionLexiconCount

The number of fragments that need the collection lexicon reindexed.

reindexDeletedCollectionLexiconCount

The number of fragments that need the collection lexicons deleted.

reindexElementWordQueryThroughs

The reindexing of word query throughs.

This is an object with the following properties:

reindexElementWordQueryThrough

The reindexing of an element word query through.

This is an object with the following properties:

namespaceUri

A namespace URI.

localname

One or more localnames.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexPhraseThroughs

The reindexing of phrase throughs.

This is an object with the following properties:

reindexPhraseThrough

The reindexing of a phrase through.

This is an object with the following properties:

namespaceUri

A namespace URI.

localname

One or more localnames.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexPhraseArounds

The reindexing of phrase arounds.

This is an object with the following properties:

reindexPhraseAround

The reindexing of a phrase around.

This is an object with the following properties:

namespaceUri

A namespace URI.

localname

One or more localnames.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexRangeElementIndexes

The reindexing of range element-indexes.

This is an object with the following properties:

reindexRangeElementIndex

The reindexing of a range element index.

This is an object with the following properties:

namespaceUri

A namespace URI.

localname

One or more localnames.

scalarType

The scalar type of a range index.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexRangeFieldIndexes

The reindexing of range field-indexes.

This is an object with the following properties:

reindexRangeFieldIndex

The reindexing of a range field index.

This is an object with the following properties:

fieldName

The field name.

scalarType

The scalar type of a range index.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexRangePathIndexes

The reindexing of range path-indexes.

This is an object with the following properties:

reindexRangePathIndex

The reindexing of a range path index.

This is an object with the following properties:

pathExpression

The path expression.

scalarType

The scalar type of a range index.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexRangeElementAttributeIndexes

The reindexing of range element attribute indexes.

This is an object with the following properties:

reindexRangeElementAttributeIndex

The reindexing of a range element attribute index.

This is an object with the following properties:

parentNamespaceUri

A namespace URI.

parentLocalname

One or more localnames.

namespaceUri

A namespace URI.

localname

One or more localnames.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexDeletedRangeIndexes

The reindexing of removed range indexes.

This is an object with the following properties:

fragmentCount

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

reindexElementWordLexicons

The reindexing of element word lexicons.

This is an object with the following properties:

reindexElementWordLexicon

The reindexing of an element word lexicon.

This is an object with the following properties:

namespaceUri

A namespace URI.

localname

One or more localnames.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexElementAttributeWordLexicons

The reindexing of element attribute word lexicons.

This is an object with the following properties:

reindexElementAttributeWordLexicon

The reindexing of an element attribute word lexicon.

This is an object with the following properties:

parentNamespaceUri

A namespace URI.

parentLocalname

One or more localnames.

namespaceUri

A namespace URI.

localname

One or more localnames.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexAllDeletedWordLexicons

The reindexing of removed word lexicons.

This is an object with the following properties:

fragmentCount

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

reindexGeospatialElementIndexes

The reindexing of geospatial element indexes.

This is an object with the following properties:

reindexGeospatialElementIndex

The reindexing of a geospatial element index.

This is an object with the following properties:

namespaceUri

A namespace URI.

localname

One or more localnames.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexGeospatialElementChildIndexes

The reindexing of geospatial element child indexes.

This is an object with the following properties:

reindexGeospatialElementChildIndex

The reindexing of a geospatial element child index.

This is an object with the following properties:

parentNamespaceUri

A namespace URI.

parentLocalname

One or more localnames.

namespaceUri

A namespace URI.

localname

One or more localnames.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexGeospatialElementPairIndexes

The reindexing of geospatial element pair indexes.

This is an object with the following properties:

reindexGeospatialElementPairIndex

The reindexing of a geospatial element pair index.

This is an object with the following properties:

parentNamespaceUri

A namespace URI.

parentLocalname

One or more localnames.

latitudeNamespaceUri

A namespace URI.

latitudeLocalname

One or more localnames.

longitudeNamespaceUri

A namespace URI.

longitudeLocalname

One or more localnames.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexGeospatialElementAttributePairIndexes

The reindexing of geospatial element indexes.

This is an object with the following properties:

reindexGeospatialElementAttributePairIndex

The reindexing of a geospatial element attribute pair index.

This is an object with the following properties:

parentNamespaceUri

A namespace URI.

parentLocalname

One or more localnames.

latitudeNamespaceUri

A namespace URI.

latitudeLocalname

One or more localnames.

longitudeNamespaceUri

A namespace URI.

longitudeLocalname

One or more localnames.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexGeospatialRegionIndexes

The reindexing of geospatial region indexes.

This is an object with the following properties:

reindexGeospatialRegionIndex

The reindexing of a geospatial region index.

This is an object with the following properties:

pathExpression

The path expression.

coordinateSystem

A coordinate system name.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexDeletedGeospatialRegionIndexes

The reindexing of removed geospatial region indexes.

This is an object with the following properties:

fragmentCount

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

reindexProtectedPaths

The reindexing of protected paths.

This is an object with the following properties:

reindexProtectedPath

The reindexing of a protected path.

This is an object with the following properties:

pathExpression

The path expression.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexDeletedProtectedPaths

The reindexing of removed protected paths.

This is an object with the following properties:

fragmentCount

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

reindexTdeTemplates

The reindexing of TDE templates.

This is an object with the following properties:

reindexTdeTemplate

A reindexing of a TDE template.

This is an object with the following properties:

tdeTemplate

A template.

reindexFragmentCount

The number of fragments that need to be reindexed.

fragmentCount

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

reindexDeletedTdeTemplates

A reindexing of deleted TDE templates.

This is an object with the following properties:

fragmentCount

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

refragmentDocumentCount

The number of documents that need to be refragmented.

refragmentFragmentRoots

The refragmenting of fragment roots.

This is an object with the following properties:

refragmentFragmentParent

The refragmenting of fragment parent.

This is an object with the following properties:

namespaceUri

A namespace URI.

localname

One or more localnames.

refragmentDocumentCount

The number of documents that need to be refragmented.

documentCount

The number of documents in the forest.

refragmentFragmentParents

The refragmenting of fragment parents.

This is an object with the following properties:

refragmentFragmentParent

The refragmenting of fragment parent.

This is an object with the following properties:

namespaceUri

A namespace URI.

localname

One or more localnames.

refragmentDocumentCount

The number of documents that need to be refragmented.

documentCount

The number of documents in the forest.

refragmentNewFields

The refragmenting of new fields.

This is an object with the following properties:

refragmentNewField

The refragmenting of a new field.

This is an object with the following properties:

fieldName

The field name.

refragmentDocumentCount

The number of documents that need to be refragmented.

documentCount

The number of documents in the forest.

refragmentModifiedFields

The refragmenting of modifiedfields.

This is an object with the following properties:

refragmentModifiedField

The refragmenting of a new field.

This is an object with the following properties:

fieldName

The field name.

refragmentDocumentCount

The number of documents that need to be refragmented.

documentCount

The number of documents in the forest.

refragmentRemovedConfigurations

Refragmenting old fragment root/parent settings

This is an object with the following properties:

refragmentDocumentCount

The number of documents that need to be refragmented.

reindexReverseSearchesFragmentCount

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

rebalanceFragmentCounts

The number of fragments that need to be rebalanced out.

This is an object with the following properties:

rebalanceFragmentCount

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

This is an object with the following properties:

rebalanceDestination

The destination of the rebalancing operation.

fragmentCount

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

rebalanceRate

The rate of rebalancing.

Example

xdmp.forestCounts(xdmp.forest("Documents"));
=>
{
  "forestId": "18080252238750949856",
  "forestName": "Documents",
  "currentTime": "2015-01-09T11:08:36.008846-08:00",
  "standsCounts":
  [
   {
    "standId": "10599000637920689925",
    "path": "/var/opt/MarkLogic/Forests/Documents/00000026",
    "activeFragmentCount": 32,
    "nascentFragmentCount": 0,
    "deletedFragmentCount": 4
   }
  ]
  ,
  "documentCount": 16,
  "directoryCount": 0
}

 

Example

// only calculate the document count
xdmp.forestCounts(xdmp.forest("Documents"), ["document-count"]);
=>
{
  "forestId": "18080252238750949856",
  "forestName": "Documents",
  "currentTime": "2015-01-09T11:13:35.642748-08:00",
  "documentCount": 16
}

 

Example

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

{
  "forestId": "18080252238750949856",
  "forestName": "Documents",
  "currentTime": "2015-01-09T11:14:19.665315-08:00",
  "standsCounts":
  [
   {
    "standId": "10599000637920689925",
    "path": "/var/opt/MarkLogic/Forests/Documents/00000026",
    "activeFragmentCount": 32,
    "nascentFragmentCount": 0,
    "deletedFragmentCount": 4
   }
  ]
  ,
  "documentCount": 16,
  "directoryCount": 0,
  ......
  ..... all of the other reindex counts
  ......
}

 

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy