admin.databaseRangeFieldIndex( scalar-type as String, fieldname as String, collation as String?, range-value-positions as Boolean, [invalid-values as String] ) as element(db.rangeFieldIndex)
This function constructs a range field index specification.
const admin = require('/MarkLogic/admin.xqy'); admin.databaseRangeFieldIndex("string", "fieldname", "http://marklogic.com/collation/", fn.false() ) //returns the range field index specification