Loading TOC...

dls.documentSetQuality

dls.documentSetQuality(
   $uri as String,
   $quality as xs.int
) as null

Summary

This function sets the quality of the document with the given URI. If the quality of the document is positive, the relevance score of the document is increased in text search functions. The converse is true for "negative" quality.

Parameters
$uri The URI of the document.
$quality The quality to which to set the document.

Required Privileges

The dls-user role is required to run this function, or the privilege:
http://marklogic.com/xdmp/privileges/dls-user

Example

// Sets the quality of the 'baz.xml' document to 10.

const dls = require('/MarkLogic/dls');

declareUpdate();
dls.documentSetQuality('/foo/bar/baz.xml', 10);    
   

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