admin.databaseSetLargeSizeThreshold( config as element(configuration), database-id as (Number|String), value as Number ) as element(configuration)
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.
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}
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
.
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.