Loading TOC...


   $scalar-type as xs:string,
   $fieldname as xs:string,
   $collation as xs:string?,
   $range-value-positions as xs:boolean,
   [$invalid-values as xs:string]
) as element(db:range-field-index)


This function constructs a range field index specification.

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.


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
		  at "/MarkLogic/admin.xqy";

  admin:database-range-field-index("string", "fieldname",
		fn:false() )

  (: returns the range field index specification :)

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