MarkLogic 12 EA 1 Product Documentation
admin.databaseSetLargeSizeThreshold

admin.databaseSetLargeSizeThreshold(
   config as element(configuration),
   database-id as (Number|String),
   value as Number
) as element(configuration)

Summary

This function sets the threshold at which binary documents in the specified database should be handled as binary large objects (BLOBs). Binary documents less than or equal to the threshold are treated as small binary objects, stored in stands. Binary documents larger than the threshold are stored in the Large Data Directory for more efficient memory consumption.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
database-id The ID of the database (for example, xdmp.database("myDatabase") ).
value The size in kilobytes beyond which binary documents are treated as binary large objects (BLOBs) and stored in the Large Data Directory. The default is 1 MB.

Required Privileges

This operation requires at least one of the following privileges:

http://marklogic.com/xdmp/privileges/admin/database

http://marklogic.com/xdmp/privileges/admin/database/{id}

http://marklogic.com/xdmp/privileges/admin/database/index

http://marklogic.com/xdmp/privileges/admin/database/index/{id}

Usage Notes

Binary documents with size less than or equal to the configured threshold are treated as small binary objects and stored in stands. The entire contents of a small binary document is cached in memory. Binary documents larger than the threshold are stored in the Large Data Directory for more efficient memory usage. For details about small vs. large binaries, see "Binary Format" in the Application Developer's Guide.

The threshold value is in kilobytes and must be in the range:

The location of the Large Data Directory may be configured during forest creation by setting the "large data directory" property on the Forest configuration page of the Admin Interface, or by passing a large-data-directory parameter to admin:forest-create.

Example

  
  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration()
  admin.databaseSetLargeSizeThreshold(config, xdmp.database("myDatabase"),
      2048)

   //returns the new configuration element -- use admin.saveConfiguration
   //to save the changes to the configuration or pass the configuration
   //to other Admin API functions to make other changes.  
      
Powered by MarkLogic Server | Terms of Use | Privacy Policy