MarkLogic 12 EA 1 Product Documentation
admin.databaseSetTfNormalization

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

Summary

This function specifies whether to use the default term-frequency normalization (scaled-log), which scales the term frequency based on the size of the document, or to use the unscaled-log, which uses term frequency as a function of the actual term frequency in a document, regardless of the document size.

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 new term-frequency normalization setting. Must be one of: scaled-log or unscaled-log.

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}

Example


  let admin = require("/MarkLogic/admin.xqy")
  let config = admin.getConfiguration()
  let db = admin.databaseGetId(config, "myDatabase")
  admin.databaseSetTfNormalization(config, db, "unscaled-log")

        
Powered by MarkLogic Server | Terms of Use | Privacy Policy