| XQUERY/XSLT API DOCUMENTATION 4.2 |
All XQuery & XSLT Functions MarkLogic Built-In Functions Admin (xdmp:) AppServer (xdmp:) Classifier (cts:) Debug (dbg:) Document Conversion (xdmp:) Extension (xdmp:) Documents, Directories, Properties, and Locks Functions Extension Functions Function Values Functions HTTP Functions JSON Functions MarkLogic Server Functions Search Functions XML Functions XQuery Context Functions XSLT Functions map (map:) Math (math:) Profile (prof:) Search (cts:) cts:query Constructors Functions Geospatial Functions Geospatial Lexicon Functions Lexicon Functions Search Functions Search Clustering Functions Security (xdmp:) Server Monitoring (xdmp:) Spell (spell:) Update (xdmp:) XQuery Library Modules Admin Library (admin:) Actions Functions Appserver Functions Database Functions Forest Functions Group Functions Host Functions Mimetypes Functions Scheduler Functions Alerting (alert:) Elastic Compute Cloud (ec2:) Entity Enrichment (entity:) Flexible Replication (flexrep:) Geospatial Supporting Functions GEO Functions GeoRSS Functions GML Functions KML Functions MCGM Functions Information Studio (info:) Information Studio Developer (infodev:) Library Services (dls:) cts:query Constructor Functions Document Management Functions Document Update Functions Retention Policy Functions XInclude Functions Modular Documents XInclude Functions XPointer Functions PKI (pki:) Plugin (plugin:) Search (search:) Security-sec (sec:) Spelling Dictionary Management (spell:) Thesaurus (thsr:) Triggers (trgr:) Triggers Library (trgr:) WordProcessingML (ooxml:) ZIP Package (ooxml:) CPF Functions Content Processing Framework (cpf:) CSS Conversion (css:) DocBook Conversion (dbk:) Domains (dom:) Excel Conversion (excel:) Generic Conversion (cvt:) Links (lnk:) MSWord Conversion (msword:) PDF Conversion (pdf:) Pipelines (p:) Powerpoint Conversion (ppt:) XHTML Conversion (xhtml:) W3C-Standard Functions Accessor (fn:) AnyURI (fn:) Boolean (fn:) Context (fn:) DurationDateTime (fn:) Error and Trace (fn:) Node (fn:) Numeric (fn:) QName (fn:) Sequence (fn:) String (fn:) XSLT (fn:) W3C XQuery/XSLT Reference W3C XQuery Functions W3C XQuery Language W3C XSLT Language
This page was generated September 12, 2012 6:00 AM | XQuery & XSLT Built-In & 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 cts:box*
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. "limit=N" Return no more than N boxes. "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. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include points in fragments selected by the `cts:query`, and compute frequencies from this set of included points. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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 cts:point*
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. "limit=N" Return no more than N values. "sample=N" Return only values from the first N fragments selected by the `cts:query`. This option does not affect the number of fragments selected by the `cts:query` to calculate frequencies. Only applies when a `$query` parameter is specified. "truncate=N" Include only values from the first N fragments selected by the `cts:query`. This option affects the number of fragments selected by the `cts:query` to calculate frequencies. 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. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include values in fragments selected by the `cts:query`, and compute frequencies from this set of included values. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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. "limit=N" Return no more than N values. "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. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include values in fragments selected by the `cts:query`, and compute frequencies from this set of included values. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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 item()*
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. "limit=N" Return no more than N co-occurrences. "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. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include co-occurrences in fragments selected by the `cts:query`, and compute frequencies from this set of included co-occurrences. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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 cts:box*
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. "limit=N" Return no more than N boxes. "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. "type=long-lat-point" Specifies the format for the point in the data as longitude first, latitude second. "type=point" Specifies the format for the point in the data as latitude first, longitude second. This is the default format. "score-logtfidf" Compute scores using the logtfidf method. "score-logtf" Compute scores using the logtf method. "score-simple" Compute scores using the simple method. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include points in fragments selected by the `cts:query`, and compute frequencies from this set of included points. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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 cts:point*
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. "limit=N" Return no more than N values. "sample=N" Return only values from the first N fragments selected by the `cts:query`. This option does not affect the number of fragments selected by the `cts:query` to calculate frequencies. Only applies when a `$query` parameter is specified. "truncate=N" Include only values from the first N fragments selected by the `cts:query`. This option affects the number of fragments selected by the `cts:query` to calculate frequencies. Only applies when a `$query` parameter is specified. "type=long-lat-point" Specifies the format for the point in the data as longitude first, latitude second. "type=point" Specifies the format for the point in the data as latitude first, longitude second. This is the default format. "score-logtfidf" Compute scores using the logtfidf method. "score-logtf" Compute scores using the logtf method. "score-simple" Compute scores using the simple method. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include values in fragments selected by the `cts:query`, and compute frequencies from this set of included values. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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. "limit=N" Return no more than N values. "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. "type=long-lat-point" Specifies the format for the point in the data as longitude first, latitude second. "type=point" Specifies the format for the point in the data as latitude first, longitude second. This is the default format. "score-logtfidf" Compute scores using the logtfidf method. "score-logtf" Compute scores using the logtf method. "score-simple" Compute scores using the simple method. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include values in fragments selected by the `cts:query`, and compute frequencies from this set of included values. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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 cts:box*
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. "limit=N" Return no more than N boxes. "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. "type=long-lat-point" Specifies the format for the point in the data as longitude first, latitude second. "type=point" Specifies the format for the point in the data as latitude first, longitude second. This is the default format. "score-logtfidf" Compute scores using the logtfidf method. "score-logtf" Compute scores using the logtf method. "score-simple" Compute scores using the simple method. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include points in fragments selected by the `cts:query`, and compute frequencies from this set of included points. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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 cts:point*
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. "limit=N" Return no more than N values. "sample=N" Return only values from the first N fragments selected by the `cts:query`. This option does not affect the number of fragments selected by the `cts:query` to calculate frequencies. Only applies when a `$query` parameter is specified. "truncate=N" Include only values from the first N fragments selected by the `cts:query`. This option affects the number of fragments selected by the `cts:query` to calculate frequencies. Only applies when a `$query` parameter is specified. "type=long-lat-point" Specifies the format for the point in the data as longitude first, latitude second. "type=point" Specifies the format for the point in the data as latitude first, longitude second. This is the default format. "score-logtfidf" Compute scores using the logtfidf method. "score-logtf" Compute scores using the logtf method. "score-simple" Compute scores using the simple method. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include values in fragments selected by the `cts:query`, and compute frequencies from this set of included values. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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 from the first N fragments selected by the `cts:query`. This option does not affect the number of fragments selected by the `cts:query` to calculate frequencies. Only applies when a `$query` parameter is specified. "truncate=N" Include only values from the first N fragments selected by the `cts:query`. This option affects the number of fragments selected by the `cts:query` to calculate frequencies. Only applies when a `$query` parameter is specified. "type=long-lat-point" Specifies the format for the point in the data as longitude first, latitude second. "type=point" Specifies the format for the point in the data as latitude first, longitude second. This is the default format. "score-logtfidf" Compute scores using the logtfidf method. "score-logtf" Compute scores using the logtf method. "score-simple" Compute scores using the simple method. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include values in fragments selected by the `cts:query`, and compute frequencies from this set of included values. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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 cts:box*
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. "limit=N" Return no more than N boxes. "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. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include points in fragments selected by the `cts:query`, and compute frequencies from this set of included points. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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 cts:point*
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. "limit=N" Return no more than N values. "sample=N" Return only values from the first N fragments selected by the `cts:query`. This option does not affect the number of fragments selected by the `cts:query` to calculate frequencies. Only applies when a `$query` parameter is specified. "truncate=N" Include only values from the first N fragments selected by the `cts:query`. This option affects the number of fragments selected by the `cts:query` to calculate frequencies. 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. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include values in fragments selected by the `cts:query`, and compute frequencies from this set of included values. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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. "limit=N" Return no more than N values. "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. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include values in fragments selected by the `cts:query`, and compute frequencies from this set of included values. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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 item()*
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. "limit=N" Return no more than N co-occurrences. "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. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include co-occurrences in fragments selected by the `cts:query`, and compute frequencies from this set of included co-occurrences. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.
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 item()*
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. "limit=N" Return no more than N co-occurrences. "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. "score-random" Compute scores using the random method. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "concurrent" Perform the work concurrently in another thread. This is a hint to the query optimizer to help parallelize the lexicon work, allowing the calling query to continue performing other work while the lexicon processing occurs. This is especially useful in cases where multiple lexicon calls occur in the same query (for example, resolving many facets in a single query).
$query (optional): Only include co-occurrences in fragments selected by the `cts:query`, and compute frequencies from this set of included co-occurrences. 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", "score-simple", or "score-random" options may be specified in the options parameter. If none of "score-logtfidf", "score-logtf", "score-simple", or "score-random" 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 may be 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.

© Copyright 2002-2012 MarkLogic Corporation. All rights reserved.