Loading TOC...

MarkLogic Server 11.0 Product Documentation
admin:database-geospatial-path-index

admin:database-geospatial-path-index(
   $pathexpr as xs:string,
   $coordinate-system as xs:string,
   $range-value-positions as xs:boolean,
   $point-format as xs:string,
   $invalid-values as xs:string
) as element(db:geospatial-path-index)

Summary

This function constructs a geospatial path index specification. For usage details, see Geospatial Path Point Queries and Indexes in the Search Developer's Guide.

Parameters
pathexpr A valid XPath expression.
coordinate-system The coordinate system. Must be one of wgs84, wgs84/double, etrs89, etrs89/double, raw, raw/double.
range-value-positions A boolean specifying whether to maintain value positions in this index (used with co-occurrences).
point-format The point format in the data: "point" means latitude precedes longitude (this is the default); "long-lat-point" means longitude precedes latitude. To use the default value of "point", simply omit this parameter. Do not specify an empty string.
invalid-values An option to handle values that do not meet the range index type. Must be one of: reject, ignore.

Example


xquery version "1.0-ml";

import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";
admin:database-geospatial-path-index(
  "/aaa:a/aaa:b",
  "wgs84",
  fn:false(),
  "long-lat-point",
  "reject" )
=>
<geospatial-path-index xmlns="http://marklogic.com/xdmp/database">
  <path-expression>/aaa:a/aaa:b</path-expression>
  <coordinate-system>wgs84</coordinate-system>
  <point-format>long-lat-point</point-format>
  <range-value-positions>false</range-value-positions>
  <invalid-values>reject</invalid-values>
</geospatial-path-index>
    

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