MarkLogic 12 EA 1 Product Documentation
admin.databaseRangeFieldIndex

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)

Summary

This function constructs a range field index specification.

Parameters
scalar-type A valid type for the range index. Must be one of: int, unsignedInt, long, unsignedLong, float, double, decimal, dateTime, time, date, gYearMonth, gYear, gMonth, gDay, yearMonthDuration, dayTimeDuration, string, anyURI.
fieldname The name for the field.
collation The collation URI (for example, http://marklogic.com/collation/). The collation is only needed for string and anyURI indexes; for other indexes, specify the empty string ("") for this parameter.
range-value-positions A boolean specifying whether to maintain value positions in this index (used with co-occurrences).
invalid-values An option to handle values that do not meet the range index type. Must be one of: reject (default), ignore.

Example

  
  const admin = require('/MarkLogic/admin.xqy');
  admin.databaseRangeFieldIndex("string", "fieldname",

                "http://marklogic.com/collation/",
		fn.false() )
   //returns the range field index specification 
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy