
xdmp.forestCounts( forest-id as (Number|String)[], [show-elements as String[]], [options as String[]] ) as Sequence
Returns detailed forest statistics for a given forest
as a Sequence of ObjectNodes.
This built-in may require significantly more processing
time than
xdmp.forestStatus.
http://marklogic.com/xdmp/privileges/counts
The structure of the data returned is as follows:
forestIdforestNamecurrentTimeerrorrebalancerErrorstandsCountsThis is an object with the following properties:
standCountsThis is an object with the following properties:
standIdpathactiveFragmentCountnascentFragmentCountdeletedFragmentCountdocumentCountdirectoryCountallQueryRolesetsFragmentCountThis is an object with the following properties:
queryRolesetsFragmentCountThis is an object with the following properties:
queryRolesetsIdfragmentCountreindexRefragmentFragmentCountreindexRefragmentRateforcedReindexFragmentCountreindexFragmentCountreindexPreviousVersionsCountreindexStemmedSearchesCountreindexWordSearchesCountreindexOneCharacterSearchesCountreindexTwoCharacterSearchesCountreindexThreeCharacterSearchesCountreindexFastPhraseSearchesCountreindexFastCaseSensitiveSearchesCountreindexFastElementWordSearchesCountreindexFastElementPhraseSearchesCountreindexFastElementCharacterSearchesCountreindexFastElementTrailingWildcardSearchesCountreindexWordPositionsCountreindexScaledLogTfNormalizationCountreindexUnscaledLogTfNormalizationCountreindexElementWordPositionsCountreindexElementValuePositionsCountreindexAttributeValuePositionsCountreindexFieldValueSearchesCountreindexFieldValuePositionsCountreindexThreeCharacterWordPositionsCountreindexTripleIndexCountreindexTriplePositionsCountreindexTrailingWildcardSearchesCountreindexTrailingWildcardWordPositionsCountreindexFastDiacriticSensitiveSearchesCountreindexWordLexiconCountreindexBinaryThresholdCountreindexDeletedStemmedSearchesCountreindexDeletedWordSearchesCountreindexDeletedOneCharacterSearchesCountreindexDeletedTwoCharacterSearchesCountreindexDeletedThreeCharacterSearchesCountreindexDeletedFastPhraseSearchesCountreindexDeletedFastCaseSensitiveSearchesCountreindexDeletedFastElementWordSearchesCountreindexDeletedFastElementPhraseSearchesCountreindexDeletedFastElementCharacterSearchesCountreindexDeletedFastElementTrailingWildcardSearchesCountreindexDeletedWordPositionsCountreindexDeletedElementWordPositionsCountreindexDeletedElementValuePositionsCountreindexDeletedFieldValueSearchesCountreindexDeletedFieldValuePositionsCountreindexDeletedAttributeValuePositionsCountreindexDeletedThreeCharacterWordPositionsCountreindexDeletedTripleIndexCountreindexDeletedTriplePositionsCountreindexDeletedTrailingWildcardSearchesCountreindexDeletedTrailingWildcardWordPositionsCountreindexDeletedFastDiacriticSensitiveSearchesCountreindexUriLexiconCountreindexDeletedUriLexiconCountreindexCollectionLexiconCountreindexDeletedCollectionLexiconCountreindexElementWordQueryThroughsThis is an object with the following properties:
reindexElementWordQueryThroughThis is an object with the following properties:
namespaceUrilocalnamereindexFragmentCountfragmentCountreindexPhraseThroughsThis is an object with the following properties:
reindexPhraseThroughThis is an object with the following properties:
namespaceUrilocalnamereindexFragmentCountfragmentCountreindexPhraseAroundsThis is an object with the following properties:
reindexPhraseAroundThis is an object with the following properties:
namespaceUrilocalnamereindexFragmentCountfragmentCountreindexRangeElementIndexesThis is an object with the following properties:
reindexRangeElementIndexThis is an object with the following properties:
namespaceUrilocalnamescalarTypereindexFragmentCountfragmentCountreindexRangeFieldIndexesThis is an object with the following properties:
reindexRangeFieldIndexThis is an object with the following properties:
fieldNamescalarTypereindexFragmentCountfragmentCountreindexRangePathIndexesThis is an object with the following properties:
reindexRangePathIndexThis is an object with the following properties:
pathExpressionscalarTypereindexFragmentCountfragmentCountreindexRangeElementAttributeIndexesThis is an object with the following properties:
reindexRangeElementAttributeIndexThis is an object with the following properties:
parentNamespaceUriparentLocalnamenamespaceUrilocalnamereindexFragmentCountfragmentCountreindexDeletedRangeIndexesThis is an object with the following properties:
fragmentCountreindexElementWordLexiconsThis is an object with the following properties:
reindexElementWordLexiconThis is an object with the following properties:
namespaceUrilocalnamereindexFragmentCountfragmentCountreindexElementAttributeWordLexiconsThis is an object with the following properties:
reindexElementAttributeWordLexiconThis is an object with the following properties:
parentNamespaceUriparentLocalnamenamespaceUrilocalnamereindexFragmentCountfragmentCountreindexAllDeletedWordLexiconsThis is an object with the following properties:
fragmentCountreindexGeospatialElementIndexesThis is an object with the following properties:
reindexGeospatialElementIndexThis is an object with the following properties:
namespaceUrilocalnamereindexFragmentCountfragmentCountreindexGeospatialElementChildIndexesThis is an object with the following properties:
reindexGeospatialElementChildIndexThis is an object with the following properties:
parentNamespaceUriparentLocalnamenamespaceUrilocalnamereindexFragmentCountfragmentCountreindexGeospatialElementPairIndexesThis is an object with the following properties:
reindexGeospatialElementPairIndexThis is an object with the following properties:
parentNamespaceUriparentLocalnamelatitudeNamespaceUrilatitudeLocalnamelongitudeNamespaceUrilongitudeLocalnamereindexFragmentCountfragmentCountreindexGeospatialElementAttributePairIndexesThis is an object with the following properties:
reindexGeospatialElementAttributePairIndexThis is an object with the following properties:
parentNamespaceUriparentLocalnamelatitudeNamespaceUrilatitudeLocalnamelongitudeNamespaceUrilongitudeLocalnamereindexFragmentCountfragmentCountreindexGeospatialRegionIndexesThis is an object with the following properties:
reindexGeospatialRegionIndexThis is an object with the following properties:
pathExpressioncoordinateSystemreindexFragmentCountfragmentCountreindexDeletedGeospatialRegionIndexesThis is an object with the following properties:
fragmentCountreindexProtectedPathsThis is an object with the following properties:
reindexProtectedPathThis is an object with the following properties:
pathExpressionreindexFragmentCountfragmentCountreindexDeletedProtectedPathsThis is an object with the following properties:
fragmentCountreindexTdeTemplatesThis is an object with the following properties:
reindexTdeTemplateThis is an object with the following properties:
tdeTemplatereindexFragmentCountfragmentCountreindexDeletedTdeTemplatesThis is an object with the following properties:
fragmentCountrefragmentDocumentCountrefragmentFragmentRootsThis is an object with the following properties:
refragmentFragmentParentThis is an object with the following properties:
namespaceUrilocalnamerefragmentDocumentCountdocumentCountrefragmentFragmentParentsThis is an object with the following properties:
refragmentFragmentParentThis is an object with the following properties:
namespaceUrilocalnamerefragmentDocumentCountdocumentCountrefragmentNewFieldsThis is an object with the following properties:
refragmentNewFieldThis is an object with the following properties:
fieldNamerefragmentDocumentCountdocumentCountrefragmentModifiedFieldsThis is an object with the following properties:
refragmentModifiedFieldThis is an object with the following properties:
fieldNamerefragmentDocumentCountdocumentCountrefragmentRemovedConfigurationsThis is an object with the following properties:
refragmentDocumentCountreindexReverseSearchesFragmentCountrebalanceFragmentCountsThis is an object with the following properties:
rebalanceFragmentCountThis is an object with the following properties:
rebalanceDestinationfragmentCountrebalanceRate
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
}
// 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
}
// 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
......
}
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.