Loading TOC...

MarkLogic 12 EA 2 Product Documentation
admin.forestSetFastDataMaxSize

admin.forestSetFastDataMaxSize(
   config as element(configuration),
   forest-id as (Number|String),
   value as Number
) as element(configuration)

Summary

This function sets the allowable size (in megabytes) for data to be kept by a forest in its fast data directory, or 0 for no limit.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
forest-id The ID of the forest. For example, xdmp.forest("myForest") specifies the ID for a forest named "myForest".
value The allowable size (in megabytes) of the data to be kept by the forest in its fast-data-directory, or 0 for no limit.

Usage Notes

The server limits the size allocated to a forest to a portion of its configured fast-data directory. This limit is normally automatically calculated from the size of the fast data directory and the number of forests using it. When this parameter is not zero, it overrides the calculated limit. Recommended values are in the range of 16384 to 32768.

Example

  
  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration()
  admin.forestSetFastDataMaxSize(config,
      admin.forestGetId(config, "Documents"),
      16384)
      => sets the fastDataMaxSize of the forest named "Documents" to
      16384 megabytes (16 gigabytes). Use admin.saveConfiguration to
      save the changes to the configuration or pass the configuration to
      other Admin API functions to make other changes.

  

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