This page was generated
July 7, 2010
4:03 PM
XQuery Built-In and Modules Function Reference

Built-In: Search - Geospatial Lexicon Functions

MarkLogic Server allows you to create geospatial lexicons, which are lists of unique values of geospatial data.

A geospatial lexicon returns geospatial values from the geospatial index. The geospatial index is required for using the geospatial lexicon functions.

This section describes the geospatial lexicon APIs.

Function Summary
cts:element-attribute-pair-geospatial-boxes Returns boxes derived from the specified element point lexicon(s).
cts:element-attribute-pair-geospatial-value-match Returns values from the specified element attribute pair geospatial value lexicon(s) that match the specified wildcard pattern.
cts:element-attribute-pair-geospatial-values Returns values from the specified element-attribute-pair geospatial value lexicon(s).
cts:element-attribute-value-geospatial-co-occurrences Returns value co-occurrences from the specified element-attribute value lexicon with the specified geospatial lexicon.
cts:element-child-geospatial-boxes Returns boxes derived from the specified element point lexicon(s).
cts:element-child-geospatial-value-match Returns values from the specified element child geospatial value lexicon(s) that match the specified wildcard pattern.
cts:element-child-geospatial-values Returns values from the specified element-child geospatial value lexicon(s).
cts:element-geospatial-boxes Returns boxes derived from the specified element point lexicon(s).
cts:element-geospatial-value-match Returns values from the specified element geospatial value lexicon(s) that match the specified wildcard pattern.
cts:element-geospatial-values Returns values from the specified element geospatial value lexicon(s).
cts:element-pair-geospatial-boxes Returns boxes derived from the specified element point lexicon(s).
cts:element-pair-geospatial-value-match Returns values from the specified element pair geospatial value lexicon(s) that match the specified wildcard pattern.
cts:element-pair-geospatial-values Returns values from the specified element-pair geospatial value lexicon(s).
cts:element-value-geospatial-co-occurrences Returns value co-occurrences from the specified element value lexicon with the specified geospatial lexicon.
cts:geospatial-co-occurrences Returns value co-occurrences from the geospatial lexicons.
Function Detail
cts:element-attribute-pair-geospatial-boxes(
$parent-element-names as xs:QName*,
$latitude-names as xs:QName*,
$longitude-names as xs:QName*,
[$latitude-bounds as xs:double*],
[$longitude-bounds as xs:double*],
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  element(cts:range)*
Summary:

Returns boxes derived from the specified element point lexicon(s). Element point lexicons are implemented using geospatial indexes; consequently this function requires a geospatial element attribute pair index for each prarent element and attribute pair specified in the function. If there is not a geospatial index configured for each of the specified combinations, an exception is thrown.

The points are divided into box-shaped buckets. The $latitude-bounds and $longitude-bounds parameters specify the number and the size of each box-shaped bucket. All included points are bucketed, even those outside the bounds. An empty sequence for both $latitude-bounds and $longitude-bounds specifies one bucket, a single value for both specifies four buckets, two values for both specify nine buckets, and so on.

For each non-empty bucket, a cts:box value is returned. By default, the cts:box value is the minimum bounding box of all the points in the bucket. If the "gridded" option is specified, then if a bucket is bounded on a side, its corresponding cts:box side is the bound. Empty buckets return nothing unless the "empties" option is specified.


Parameters:
$parent-element-names : One or more element QNames.
$latitude-names : One or more element QNames.
$longitude-names : One or more element QNames.
$latitude-bounds (optional): A sequence of latitude bounds. The values must be in strictly ascending order, otherwise an exception is thrown.
$longitude-bounds (optional): A sequence of longitude bounds. The values must be in strictly ascending order, otherwise an exception is thrown.
$options (optional): Options. The default is ().

Options include:

"ascending"
Boxes should be returned in ascending order.
"descending"
Boxes should be returned in descending order.
"gridded"
For each side that a bucket is bounded, return the corresponding bound as the edge of the box, instead of the extremum from the points in the bucket.
"empties"
Include fully-bounded ranges whose frequency is 0. Only empty ranges that have both their upper and lower bounds specified in the $bounds options are returned; any empty ranges that are less than the first bound or greater than the last bound are not returned. For example, if you specify 4 bounds and there are no results for any of the bounds, 3 elements are returned (not 5 elements).
"any"
Points from any fragment should be included.
"document"
Points from document fragments should be included.
"properties"
Points from properties fragments should be included.
"locks"
Points from locks fragments should be included.
"frequency-order"
Boxes should be returned ordered by frequency.
"item-order"
Boxes should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included point. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included point. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
"sample=N"
Return only boxes for buckets with at least one point from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only points from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include points in fragments selected by the cts:query. The points do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all boxes with included points are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then points from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, points from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see points from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 


cts:element-attribute-pair-geospatial-value-match(
$element-names as xs:QName*,
$latitude-names as xs:QName*,
$longitude-names as xs:QName*,
$pattern as xs:anyAtomicType,
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  xs:anyAtomicType*
Summary:

Returns values from the specified element attribute pair geospatial value lexicon(s) that match the specified wildcard pattern. Element attribute pair geospatial value lexicons are implemented using geospatial indexes; consequently this function requires an element attribute pair geospatial index for each combination of elements and attributes specified in the function. If there is not a geospatial index configured for each of the specified combinations, then an exception is thrown.

Parameters:
$element-names : One or more element QNames.
$latitude-names : One or more latitude element QNames.
$longitude-names : One or more longitude element QNames.
$pattern : A pattern to match. The parameter type must match the lexicon type.
$options (optional): Options. The default is ().

Options include:

"ascending"
Values should be returned in ascending order.
"descending"
Values should be returned in descending order.
"any"
Values from any fragment should be included.
"document"
Values from document fragments should be included.
"properties"
Values from properties fragments should be included.
"locks"
Values from locks fragments should be included.
"frequency-order"
Values should be returned ordered by frequency.
"item-order"
Values should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included value. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included value. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
"sample=N"
Return only values occurring in the first N fragments selected by the cts:query; only values in fragments satisfying the cts:query are returned, but any analytics calculations (using cts:frequency, for example) use all the lexicon values, not just the ones constrained by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only values from the first N fragments selected by the cts:query; only values in fragments satisfying the cts:query are returned, and only those values are used in calculating any analytics (using cts:frequency, for example). Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include values in fragments selected by the cts:query. The values do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all included values are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then values from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, values from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see values from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 

Example:
  cts:element-attribute-pair-geospatial-value-match(
     xs:QName("location"),xs:QName("lat"),xs:QName("long"),cts:point(10,20))
  => 10,20

cts:element-attribute-pair-geospatial-values(
$element-names as xs:QName*,
$latitude-names as xs:QName*,
$longitude-names as xs:QName*,
[$start as cts:point?],
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  cts:point*
Summary:

Returns values from the specified element-attribute-pair geospatial value lexicon(s). element-attribute-pair geospatial value lexicons are implemented using geospatial indexes; consequently this function requires an element-attribute-pair geospatial index of for each of the combinatation specified in the function. If there is not a geospatial index configured for each of the specified combinations, then an exception is thrown.

Parameters:
$element-names : One or more element QNames.
$latitude-names : One or more latitude element QNames.
$longitude-names : One or more longitude element QNames.
$start (optional): A starting value. If the parameter value is is not in the lexicon, then the values are returned beginning with the next value.
$options (optional): Options. The default is ().

Options include:

"ascending"
Values should be returned in ascending order.
"descending"
Values should be returned in descending order.
"any"
Values from any fragment should be included.
"document"
Values from document fragments should be included.
"properties"
Values from properties fragments should be included.
"locks"
Values from locks fragments should be included.
"frequency-order"
Values should be returned ordered by frequency.
"item-order"
Values should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included value. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included value. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
"sample=N"
Return only values from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only values from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include values in fragments selected by the cts:query. The values do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all included values are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then values from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

When multiple element and/or child QNames are specified, then all possible element/child QName combinations are used to select the matching values.

If the $query parameter is not present and the current user is assigned the admin role, values from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see values from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 

Example:
  cts:element-attribute-pair-geospatial-values(
     xs:QName("location"), xs:QName("position"), cts:point(0,0) )
  => (cts:point(0,0),cts:point(0,10),cts:point(0,20),...)

cts:element-attribute-value-geospatial-co-occurrences(
$element-name-1 as xs:QName,
$attribute-name-1 as xs:QName?,
$geo-element-name as xs:QName,
$child-name-1 as xs:QName?,
$child-name-2 as xs:QName?,
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  element(cts:co-occurrence)*
Summary:

Returns value co-occurrences from the specified element-attribute value lexicon with the specified geospatial lexicon. Value lexicons are implemented using range indexes; consequently this function requires a range index for the element and attribute pair specified in the function. If there is not a range index configured for the specified element and attribute pair, then an exception is thrown. Geospatial lexicons are implemented using geospatial indexes; consequently this function requires a geospatial index for the element/attribute combination specified in the function. If there is not a geospatial index configured for the specified element/attribute combination, then an exception is thrown.

Parameters:
$element-name-1 : An element QName.
$attribute-name-1 : An attribute QName.
$geo-element-name : An element QName.
$child-name-1 : An element or attribute QName or empty sequence. The empty sequence specifies an element geospatial lexicon.
$child-name-2 : An element or attribute QName or empty sequence. The empty sequence specifies either an element lexicon or an element-child geospatial lexicon.
$options (optional): Options. The default is ().

Options include:

"geospatial-format=format"
Use the kind of geospatial lexicon specified by format (element, element-child, element-pair, or element-attribute-pair). If neither of the child QNames is specified, the default is "element"; if only the first of the child QNames is specified, the default is "element-child:; if both child QNames are specified, the default is "element-pair". If the selection is not compatible with the number of geospatial QNames specified, an error is raised.
"ascending"
Co-occurrences should be returned in ascending order.
"descending"
Co-occurrences should be returned in descending order.
"any"
Co-occurrences from any fragment should be included.
"document"
Co-occurrences from document fragments should be included.
"properties"
Co-occurrences from properties fragments should be included.
"locks"
Co-occurrences from locks fragments should be included.
"frequency-order"
Co-occurrences should be returned ordered by frequency.
"item-order"
Co-occurrences should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included co-occurrences. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included co-occurrence. This option is used with cts:frequency.
"type=type"
For the non-geospatial lexicon, use the type specified by type (int, unsignedInt, long, unsignedLong, float, double, decimal, dateTime, time, date, gYearMonth, gYear, gMonth, gDay, yearMonthDuration, dayTimeDuration, string, or anyURI)
"collation=URI"
For the non-geospatial lexicon, use the collation specified by URI.
"coordinate-system=URI"
For the geospatial lexicons, use the coordinate system specified by name.
"timezone=TZ"
Return timezone sensitive values (dateTime, time, date, gYearMonth, gYear, gMonth, and gDay) adjusted to the timezone specified by TZ. Example timezones: Z, -08:00, +01:00.
"ordered"
Include co-occurrences only when the value from the first lexicon appears before the value from the second lexicon. Requires that word positions be enabled for both lexicons.
"reversed"
Consider the second lexicon as the first and vice versa.
"proximity=N"
Include co-occurrences only when the values appear within N words of each other. Requires that word positions be enabled for both lexicons.
"sample=N"
Return only co-occurrences from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only co-occurrences from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include co-occurrences in fragments selected by the cts:query. The co-occurrences do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "collation=URI" is not specified in the options parameter, then the default collation is used. If a lexicon with that collation does not exist, an error is thrown.

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all included co-occurrences are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then co-occurrences from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, co-occurrences from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see co-occurrences from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 


cts:element-child-geospatial-boxes(
$parent-element-names as xs:QName*,
$child-element-names as xs:QName*,
[$latitude-bounds as xs:double*],
[$longitude-bounds as xs:double*],
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  element(cts:range)*
Summary:

Returns boxes derived from the specified element point lexicon(s). Element point lexicons are implemented using geospatial indexes; consequently this function requires an element child geospatial index for each element specified in the function. If there is not a geospatial index configured for each of the specified element/child combinations, an exception is thrown.

The points are divided into box-shaped buckets. The $latitude-bounds and $longitude-bounds parameters specify the number and the size of each box-shaped bucket. All included points are bucketed, even those outside the bounds. An empty sequence for both $latitude-bounds and $longitude-bounds specifies one bucket, a single value for both specifies four buckets, two values for both specify nine buckets, and so on.

For each non-empty bucket, a cts:box value is returned. By default, the cts:box value is the minimum bounding box of all the points in the bucket. If the "gridded" option is specified, then if a bucket is bounded on a side, its corresponding cts:box side is the bound. Empty buckets return nothing unless the "empties" option is specified.


Parameters:
$parent-element-names : One or more element QNames.
$child-element-names : One or more element QNames.
$latitude-bounds (optional): A sequence of latitude bounds. The values must be in strictly ascending order, otherwise an exception is thrown.
$longitude-bounds (optional): A sequence of longitude bounds. The values must be in strictly ascending order, otherwise an exception is thrown.
$options (optional): Options. The default is ().

Options include:

"ascending"
Boxes should be returned in ascending order.
"descending"
Boxes should be returned in descending order.
"gridded"
For each side that a bucket is bounded, return the corresponding bound as the edge of the box, instead of the extremum from the points in the bucket.
"empties"
Include fully-bounded ranges whose frequency is 0. Only empty ranges that have both their upper and lower bounds specified in the $bounds options are returned; any empty ranges that are less than the first bound or greater than the last bound are not returned. For example, if you specify 4 bounds and there are no results for any of the bounds, 3 elements are returned (not 5 elements).
"any"
Points from any fragment should be included.
"document"
Points from document fragments should be included.
"properties"
Points from properties fragments should be included.
"locks"
Points from locks fragments should be included.
"frequency-order"
Boxes should be returned ordered by frequency.
"item-order"
Boxes should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included point. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included point. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
"sample=N"
Return only boxes for buckets with at least one point from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only points from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include points in fragments selected by the cts:query. The points do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all boxes with included points are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then points from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, points from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see points from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 


cts:element-child-geospatial-value-match(
$element-names as xs:QName*,
$child-names as xs:QName*,
$pattern as xs:anyAtomicType,
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  xs:anyAtomicType*
Summary:

Returns values from the specified element child geospatial value lexicon(s) that match the specified wildcard pattern. Element child geospatial value lexicons are implemented using geospatial indexes; consequently this function requires an element child geospatial index for each element and child specified in the function. If there is not a geospatial index configured for each of the specified elements/child combinations, then an exception is thrown.

Parameters:
$element-names : One or more element QNames.
$child-names : One or more child element QNames.
$pattern : A pattern to match. The parameter type must match the lexicon type.
$options (optional): Options. The default is ().

Options include:

"ascending"
Values should be returned in ascending order.
"descending"
Values should be returned in descending order.
"any"
Values from any fragment should be included.
"document"
Values from document fragments should be included.
"properties"
Values from properties fragments should be included.
"locks"
Values from locks fragments should be included.
"frequency-order"
Values should be returned ordered by frequency.
"item-order"
Values should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included value. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included value. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
"sample=N"
Return only values occurring in the first N fragments selected by the cts:query; only values in fragments satisfying the cts:query are returned, but any analytics calculations (using cts:frequency, for example) use all the lexicon values, not just the ones constrained by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only values from the first N fragments selected by the cts:query; only values in fragments satisfying the cts:query are returned, and only those values are used in calculating any analytics (using cts:frequency, for example). Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include values in fragments selected by the cts:query. The values do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all included values are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then values from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, values from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see values from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 

Example:
  cts:element-child-geospatial-value-match(
     xs:QName("location"),xs:QName("pos"),cts:point(10,20))
  => 10,20

cts:element-child-geospatial-values(
$element-names as xs:QName*,
$child-names as xs:QName*,
[$start as cts:point?],
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  cts:point*
Summary:

Returns values from the specified element-child geospatial value lexicon(s). Element-child geospatial value lexicons are implemented using geospatial indexes; consequently this function requires an element-child geospatial index of for each of the element/child pairs specified in the function. If there is not a range index configured for each of the specified element/child pairs, then an exception is thrown.

Parameters:
$element-names : One or more element QNames.
$child-names : One or more child element QNames.
$start (optional): A starting value. If the parameter value is is not in the lexicon, then the values are returned beginning with the next value.
$options (optional): Options. The default is ().

Options include:

"ascending"
Values should be returned in ascending order.
"descending"
Values should be returned in descending order.
"any"
Values from any fragment should be included.
"document"
Values from document fragments should be included.
"properties"
Values from properties fragments should be included.
"locks"
Values from locks fragments should be included.
"frequency-order"
Values should be returned ordered by frequency.
"item-order"
Values should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included value. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included value. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
"sample=N"
Return only values from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only values from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include values in fragments selected by the cts:query. The values do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all included values are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then values from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

When multiple element and/or child QNames are specified, then all possible element/child QName combinations are used to select the matching values.

If the $query parameter is not present and the current user is assigned the admin role, values from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see values from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 

Example:
  cts:element-child-geospatial-values(
     xs:QName("location"), xs:QName("position"), cts:point(0,0) )
  => (cts:point(0,0),cts:point(0,10),cts:point(0,20),...)

cts:element-geospatial-boxes(
$element-names as xs:QName*,
[$latitude-bounds as xs:double*],
[$longitude-bounds as xs:double*],
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  element(cts:range)*
Summary:

Returns boxes derived from the specified element point lexicon(s). Element point lexicons are implemented using geospatial indexes; consequently this function requires an element geospatial index for each element specified in the function. If there is not a geospatial index configured for each of the specified elements, an exception is thrown.

The points are divided into box-shaped buckets. The $latitude-bounds and $longitude-bounds parameters specify the number and the size of each box-shaped bucket. All included points are bucketed, even those outside the bounds. An empty sequence for both $latitude-bounds and $longitude-bounds specifies one bucket, a single value for both specifies four buckets, two values for both specify nine buckets, and so on.

For each non-empty bucket, a cts:box value is returned. By default, the cts:box value is the minimum bounding box of all the points in the bucket. If the "gridded" option is specified, then if a bucket is bounded on a side, its corresponding cts:box side is the bound. Empty buckets return nothing unless the "empties" option is specified.


Parameters:
$element-names : One or more element QNames.
$latitude-bounds (optional): A sequence of latitude bounds. The values must be in strictly ascending order, otherwise an exception is thrown.
$longitude-bounds (optional): A sequence of longitude bounds. The values must be in strictly ascending order, otherwise an exception is thrown.
$options (optional): Options. The default is ().

Options include:

"ascending"
Boxes should be returned in ascending order.
"descending"
Boxes should be returned in descending order.
"gridded"
For each side that a bucket is bounded, return the corresponding bound as the edge of the box, instead of the extremum from the points in the bucket.
"empties"
Include fully-bounded ranges whose frequency is 0. Only empty ranges that have both their upper and lower bounds specified in the $bounds options are returned; any empty ranges that are less than the first bound or greater than the last bound are not returned. For example, if you specify 4 bounds and there are no results for any of the bounds, 3 elements are returned (not 5 elements).
"any"
Points from any fragment should be included.
"document"
Points from document fragments should be included.
"properties"
Points from properties fragments should be included.
"locks"
Points from locks fragments should be included.
"frequency-order"
Boxes should be returned ordered by frequency.
"item-order"
Boxes should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included point. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included point. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
"sample=N"
Return only boxes for buckets with at least one point from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only points from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include points in fragments selected by the cts:query. The points do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all boxes with included points are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then points from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, points from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see points from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 


cts:element-geospatial-value-match(
$element-names as xs:QName*,
$pattern as xs:anyAtomicType,
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  xs:anyAtomicType*
Summary:

Returns values from the specified element geospatial value lexicon(s) that match the specified wildcard pattern. Element geospatial value lexicons are implemented using geospatial indexes; consequently this function requires an element geospatial index for each element specified in the function. If there is not a geospatial index configured for each of the specified elements, then an exception is thrown.

Parameters:
$element-names : One or more element QNames.
$pattern : A pattern to match. The parameter type must match the lexicon type.
$options (optional): Options. The default is ().

Options include:

"ascending"
Values should be returned in ascending order.
"descending"
Values should be returned in descending order.
"any"
Values from any fragment should be included.
"document"
Values from document fragments should be included.
"properties"
Values from properties fragments should be included.
"locks"
Values from locks fragments should be included.
"frequency-order"
Values should be returned ordered by frequency.
"item-order"
Values should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included value. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included value. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
"sample=N"
Return only values occurring in the first N fragments selected by the cts:query; only values in fragments satisfying the cts:query are returned, but any analytics calculations (using cts:frequency, for example) use all the lexicon values, not just the ones constrained by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only values from the first N fragments selected by the cts:query; only values in fragments satisfying the cts:query are returned, and only those values are used in calculating any analytics (using cts:frequency, for example). Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include values in fragments selected by the cts:query. The values do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all included values are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then values from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, values from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see values from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 

Example:
  cts:element-geospatial-value-match(xs:QName("point"),cts:point(10,20))
  => 10,20

cts:element-geospatial-values(
$element-names as xs:QName*,
[$start as cts:point?],
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  cts:point*
Summary:

Returns values from the specified element geospatial value lexicon(s). Geospatial value lexicons are implemented using geospatial indexes; consequently this function requires an element geospatial index for each element specified in the function. If there is not a geospatial index configured for each of the specified elements, an exception is thrown.

Parameters:
$element-names : One or more element QNames.
$start (optional): A starting value. If the parameter value is is not in the lexicon, then the values are returned beginning with the next value.
$options (optional): Options. The default is ().

Options include:

"ascending"
Values should be returned in ascending order.
"descending"
Values should be returned in descending order.
"any"
Values from any fragment should be included.
"document"
Values from document fragments should be included.
"properties"
Values from properties fragments should be included.
"locks"
Values from locks fragments should be included.
"frequency-order"
Values should be returned ordered by frequency.
"item-order"
Values should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included value. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included value. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
Return only values occurring in the first N fragments selected by the cts:query; only values in fragments satisfying the cts:query are returned, but any analytics calculations (using cts:frequency, for example) use all the lexicon values, not just the ones constrained by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only values from the first N fragments selected by the cts:query; only values in fragments satisfying the cts:query are returned, and only those values are used in calculating any analytics (using cts:frequency, for example). Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include values in fragments selected by the cts:query. The values do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all included values are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then values from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, values from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see values from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 

Example:
  cts:element-geospatial-values(xs:QName("point"),cts:point(0,0))
  => (cts:point(0,0),cts:point(0,10),cts:point(0,20),...)

cts:element-pair-geospatial-boxes(
$parent-element-names as xs:QName*,
$latitude-names as xs:QName*,
$longitude-names as xs:QName*,
[$latitude-bounds as xs:double*],
[$longitude-bounds as xs:double*],
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  element(cts:range)*
Summary:

Returns boxes derived from the specified element point lexicon(s). Element point lexicons are implemented using geospatial indexes; consequently this function requires a geospatial element pair index for each parent and pair of child elements specified in the function. If there is not a geospatial index configured for each of the specified combinations, an exception is thrown.

The points are divided into box-shaped buckets. The $latitude-bounds and $longitude-bounds parameters specify the number and the size of each box-shaped bucket. All included points are bucketed, even those outside the bounds. An empty sequence for both $latitude-bounds and $longitude-bounds specifies one bucket, a single value for both specifies four buckets, two values for both specify nine buckets, and so on.

For each non-empty bucket, a cts:box value is returned. By default, the cts:box value is the minimum bounding box of all the points in the bucket. If the "gridded" option is specified, then if a bucket is bounded on a side, its corresponding cts:box side is the bound. Empty buckets return nothing unless the "empties" option is specified.


Parameters:
$parent-element-names : One or more element QNames.
$latitude-names : One or more element QNames.
$longitude-names : One or more element QNames.
$latitude-bounds (optional): A sequence of latitude bounds. The values must be in strictly ascending order, otherwise an exception is thrown.
$longitude-bounds (optional): A sequence of longitude bounds. The values must be in strictly ascending order, otherwise an exception is thrown.
$options (optional): Options. The default is ().

Options include:

"ascending"
Boxes should be returned in ascending order.
"descending"
Boxes should be returned in descending order.
"gridded"
For each side that a bucket is bounded, return the corresponding bound as the edge of the box, instead of the extremum from the points in the bucket.
"empties"
Include fully-bounded ranges whose frequency is 0. Only empty ranges that have both their upper and lower bounds specified in the $bounds options are returned; any empty ranges that are less than the first bound or greater than the last bound are not returned. For example, if you specify 4 bounds and there are no results for any of the bounds, 3 elements are returned (not 5 elements).
"any"
Points from any fragment should be included.
"document"
Points from document fragments should be included.
"properties"
Points from properties fragments should be included.
"locks"
Points from locks fragments should be included.
"frequency-order"
Boxes should be returned ordered by frequency.
"item-order"
Boxes should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included point. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included point. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
"sample=N"
Return only boxes for buckets with at least one point from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only points from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include points in fragments selected by the cts:query. The points do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all boxes with included points are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then points from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, points from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see points from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 


cts:element-pair-geospatial-value-match(
$element-names as xs:QName*,
$latitude-names as xs:QName*,
$longitude-names as xs:QName*,
$pattern as xs:anyAtomicType,
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  xs:anyAtomicType*
Summary:

Returns values from the specified element pair geospatial value lexicon(s) that match the specified wildcard pattern. Element pair geospatial value lexicons are implemented using geospatial indexes; consequently this function requires an element pair geospatial index for each combination of elements specified in the function. If there is not a geospatial index configured for each of the specified combinations, then an exception is thrown.

Parameters:
$element-names : One or more element QNames.
$latitude-names : One or more latitude element QNames.
$longitude-names : One or more longitude element QNames.
$pattern : A pattern to match. The parameter type must match the lexicon type.
$options (optional): Options. The default is ().

Options include:

"ascending"
Values should be returned in ascending order.
"descending"
Values should be returned in descending order.
"any"
Values from any fragment should be included.
"document"
Values from document fragments should be included.
"properties"
Values from properties fragments should be included.
"locks"
Values from locks fragments should be included.
"frequency-order"
Values should be returned ordered by frequency.
"item-order"
Values should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included value. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included value. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
"sample=N"
Return only values occurring in the first N fragments selected by the cts:query; only values in fragments satisfying the cts:query are returned, but any analytics calculations (using cts:frequency, for example) use all the lexicon values, not just the ones constrained by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only values from the first N fragments selected by the cts:query; only values in fragments satisfying the cts:query are returned, and only those values are used in calculating any analytics (using cts:frequency, for example). Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include values in fragments selected by the cts:query. The values do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all included values are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then values from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, values from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see values from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 

Example:
  cts:element-pair-geospatial-value-match(
     xs:QName("location"),xs:QName("lat"),xs:QName("long"),cts:point(10,20))
  => 10,20

cts:element-pair-geospatial-values(
$element-names as xs:QName*,
$latitude-names as xs:QName*,
$longitude-names as xs:QName*,
[$start as cts:point?],
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  cts:point*
Summary:

Returns values from the specified element-pair geospatial value lexicon(s). element-pair geospatial value lexicons are implemented using geospatial indexes; consequently this function requires an element-pair geospatial index of for each of the combinatation specified in the function. If there is not a geospatial index configured for each of the specified combinations, then an exception is thrown.

Parameters:
$element-names : One or more element QNames.
$latitude-names : One or more latitude element QNames.
$longitude-names : One or more longitude element QNames.
$start (optional): A starting value. If the parameter value is is not in the lexicon, then the values are returned beginning with the next value.
$options (optional): Options. The default is ().

Options include:

"ascending"
Values should be returned in ascending order.
"descending"
Values should be returned in descending order.
"any"
Values from any fragment should be included.
"document"
Values from document fragments should be included.
"properties"
Values from properties fragments should be included.
"locks"
Values from locks fragments should be included.
"frequency-order"
Values should be returned ordered by frequency.
"item-order"
Values should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included value. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included value. This option is used with cts:frequency.
"coordinate-system=URI"
Use the lexicon with the coordinate system specified by name.
"sample=N"
Return only values from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only values from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include values in fragments selected by the cts:query. The values do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all included values are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then values from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

When multiple element and/or child QNames are specified, then all possible element/child QName combinations are used to select the matching values.

If the $query parameter is not present and the current user is assigned the admin role, values from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see values from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 

Example:
  cts:element-pair-geospatial-values(
     xs:QName("location"), xs:QName("position"), cts:point(0,0) )
  => (cts:point(0,0),cts:point(0,10),cts:point(0,20),...)

cts:element-value-geospatial-co-occurrences(
$element-name-1 as xs:QName,
$geo-element-name as xs:QName,
$child-name-1 as xs:QName?,
$child-name-2 as xs:QName?,
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  element(cts:co-occurrence)*
Summary:

Returns value co-occurrences from the specified element value lexicon with the specified geospatial lexicon. Value lexicons are implemented using range indexes; consequently this function requires a range index for the element specified in the function. If there is not a range index configured for the specified element, then an exception is thrown. Geospatial lexicons are implemented using geospatial indexes; consequently this function requires a geospatial index for the element/attribute combination specified in the function. If there is not a geospatial index configured for the specified element/attribute combination, then an exception is thrown.

Parameters:
$element-name-1 : An element QName.
$geo-element-name : An element QName.
$child-name-1 : An element or attribute QName or empty sequence. The empty sequence specifies an element geospatial lexicon.
$child-name-2 : An element or attribute QName or empty sequence. The empty sequence specifies either an element lexicon or an element-child geospatial lexicon.
$options (optional): Options. The default is ().

Options include:

"geospatial-format=format"
Use the kind of geospatial lexicon specified by format (element, element-child, element-pair, or element-attribute-pair). If neither of the child QNames is specified, the default is "element"; if only the first of the child QNames is specified, the default is "element-child:; if both child QNames are specified, the default is "element-pair". If the selection is not compatible with the number of geospatial QNames specified, an error is raised.
"ascending"
Co-occurrences should be returned in ascending order.
"descending"
Co-occurrences should be returned in descending order.
"any"
Co-occurrences from any fragment should be included.
"document"
Co-occurrences from document fragments should be included.
"properties"
Co-occurrences from properties fragments should be included.
"locks"
Co-occurrences from locks fragments should be included.
"frequency-order"
Co-occurrences should be returned ordered by frequency.
"item-order"
Co-occurrences should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included co-occurrences. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included co-occurrence. This option is used with cts:frequency.
"type=type"
For the non-geospatial lexicon, use the type specified by type (int, unsignedInt, long, unsignedLong, float, double, decimal, dateTime, time, date, gYearMonth, gYear, gMonth, gDay, yearMonthDuration, dayTimeDuration, string, or anyURI)
"type-2=type"
For the geospatial lexicon, use the type specified by type-2 (point or long-lat-point)
"collation=URI"
For the non-geospatial lexicon, use the collation specified by URI.
"coordinate-system=URI"
For the geospatial lexicons, use the coordinate system specified by name.
"timezone=TZ"
Return timezone sensitive values (dateTime, time, date, gYearMonth, gYear, gMonth, and gDay) adjusted to the timezone specified by TZ. Example timezones: Z, -08:00, +01:00.
"ordered"
Include co-occurrences only when the value from the first lexicon appears before the value from the second lexicon. Requires that word positions be enabled for both lexicons.
"reversed"
Consider the second lexicon as the first and vice versa.
"proximity=N"
Include co-occurrences only when the values appear within N words of each other. Requires that word positions be enabled for both lexicons.
"sample=N"
Return only co-occurrences from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only co-occurrences from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include co-occurrences in fragments selected by the cts:query. The co-occurrences do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "collation=URI" is not specified in the options parameter, then the default collation is used. If a lexicon with that collation does not exist, an error is thrown.

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all included co-occurrences are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then co-occurrences from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, co-occurrences from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see co-occurrences from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () ) 


cts:geospatial-co-occurrences(
$geo-element-name-1 as xs:QName,
$child-1-name-1 as xs:QName?,
$child-1-name-2 as xs:QName?,
$geo-element-name-2 as xs:QName,
$child-2-name-1 as xs:QName?,
$child-2-name-2 as xs:QName?,
[$options as xs:string*],
[$query as cts:query?],
[$quality-weight as xs:double],
[$forest-ids as xs:unsignedLong*]
)  as  element(cts:co-occurrence)*
Summary:

Returns value co-occurrences from the geospatial lexicons. Geospatial lexicons are implemented using geospatial indexes; consequently this function requires a geospatial index for each combination of elements and attributes specified in the function. If there is not a geospatial index configured for the specified element/attribute combination, then an exception is thrown.

Parameters:
$geo-element-name-1 : An element QName.
$child-1-name-1 : An element or attribute QName or empty sequence. The empty sequence specifies an element geospatial lexicon.
$child-1-name-2 : An element or attribute QName or empty sequence. The empty sequence specifies either an element lexicon or an element-child geospatial lexicon.
$geo-element-name-2 : An element QName.
$child-2-name-1 : An element or attribute QName or empty sequence. The empty sequence specifies an element geospatial lexicon.
$child-2-name-2 : An element or attribute QName or empty sequence. The empty sequence specifies either an element lexicon or an element-child geospatial lexicon.
$options (optional): Options. The default is ().

Options include:

"geospatial-format=format"
For both geospatial lexicons, use the kind of geospatial lexicon specified by format (element, element-child, element-pair, or element-attribute-pair). If neither of the child QNames is specified, the default is "element"; if only the first of the child QNames is specified, the default is "element-child:; if both child QNames are specified, the default is "element-pair". If the selection is not compatible with the number of geospatial QNames specified, an error is raised.
"geospatial-format-1=format"
For the first geospatial lexicon, use the kind of geospatial lexicon specified by format (element, element-child, element-pair, or element-attribute-pair). If neither of the child QNames is specified, the default is "element"; if only the first of the child QNames is specified, the default is "element-child:; if both child QNames are specified, the default is "element-pair". If the selection is not compatible with the number of geospatial QNames specified, an error is raised.
"geospatial-format-2=format"
For the second geospatial lexicons, use the kind of geospatial lexicon specified by format (element, element-child, element-pair, or element-attribute-pair). If neither of the child QNames is specified, the default is "element"; if only the first of the child QNames is specified, the default is "element-child:; if both child QNames are specified, the default is "element-pair". If the selection is not compatible with the number of geospatial QNames specified, an error is raised.
"ascending"
Co-occurrences should be returned in ascending order.
"descending"
Co-occurrences should be returned in descending order.
"any"
Co-occurrences from any fragment should be included.
"document"
Co-occurrences from document fragments should be included.
"properties"
Co-occurrences from properties fragments should be included.
"locks"
Co-occurrences from locks fragments should be included.
"frequency-order"
Co-occurrences should be returned ordered by frequency.
"item-order"
Co-occurrences should be returned ordered by item.
"fragment-frequency"
Frequency should be the number of fragments with an included co-occurrences. This option is used with cts:frequency.
"item-frequency"
Frequency should be the number of occurences of an included co-occurrence. This option is used with cts:frequency.
"coordinate-system=URI"
For both geospatial lexicons, use the coordinate system specified by name.
"coordinate-system-1=URI"
For the first geospatial lexicon, use the coordinate system specified by name.
"coordinate-system-2=URI"
For the second geospatial lexicons, use the coordinate system specified by name.
"ordered"
Include co-occurrences only when the value from the first lexicon appears before the value from the second lexicon. Requires that word positions be enabled for both lexicons.
"reversed"
Consider the second lexicon as the first and vice versa.
"proximity=N"
Include co-occurrences only when the values appear within N words of each other. Requires that word positions be enabled for both lexicons.
"sample=N"
Return only co-occurrences from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"truncate=N"
Include only co-occurrences from the first N fragments selected by the cts:query. Only applies when a $query parameter is specified.
"score-logtfidf"
Compute scores using the logtfidf method.
"score-logtf"
Compute scores using the logtf method.
"score-simple"
Compute scores using the simple method.
"checked"
Word positions should be checked when resolving the query.
"unchecked"
Word positions should not be checked when resolving the query.
$query (optional): Only include co-occurrences in fragments selected by the cts:query. The co-occurrences do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations.
$quality-weight (optional): A document quality weight to use when computing scores. The default is 1.0.
$forest-ids (optional): A sequence of IDs of forests to which the search will be constrained. An empty sequence means to search all forests in the database. The default is ().

Usage Notes:

Only one of "frequency-order" or "item-order" may be specified in the options parameter. If neither "frequency-order" nor "item-order" is specified, then the default is "item-order".

Only one of "fragment-frequency" or "item-frequency" may be specified in the options parameter. If neither "fragment-frequency" nor "item-frequency" is specified, then the default is "fragment-frequency".

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending" if "item-order" is specified, and "descending" if "frequency-order" is specified.

Only one of "any", "document", "properties", or "locks" may be specified in the options parameter. If none of "any", "document", "properties", or "locks" are specified and there is a $query parameter, then the default is "document". If there is no $query parameter then the default is "any".

Only one of the "score-logtfidf", "score-logtf", or "score-simple" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", or "score-simple", are specified, then the default is "score-logtfidf".

Only one of the "checked" or "unchecked" options may be specified in the options parameter. If neither "checked" nor "unchecked" are specified, then the default is "checked".

If "coordinate-system=name" is not specified in the options parameter, then the default coordinate system is used. If a lexicon with that coordinate system does not exist, an error is thrown.

If "sample=N" is not specfied in the options parameter, then all included co-occurrences are returned. If a $query parameter is not present, then "sample=N" has no effect.

If "truncate=N" is not specfied in the options parameter, then co-occurrences from all fragments selected by the $query parameter are included. If a $query parameter is not present, then "truncate=N" has no effect.

If the $query parameter is not present and the current user is assigned the admin role, co-occurrences from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see co-occurrences from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:

      cts:and-query( () )