admin.databaseFieldPath( field-path as String, weight as Number ) as element(db.fieldPath)
This function is a constructor for field-path element. The field path element is used to construct a field.
Parameters | |
---|---|
field-path | A valid XPath expression. |
weight | The path weight used in relevance calculations. |
const admin = require('/MarkLogic/admin.xqy'); admin.databaseFieldPath("/a/b", xs.double(2.0)) => returns element(db.fieldPath)