Namespace: cts
planBuilder. cts
Builds expressions to call functions in
the cts server library for a row pipeline.
- Since:
-
- 2.1.1
Methods
-
-
afterQuery(timestamp) → {CtsQuery}
-
Returns a query matching fragments committed after a specified timestamp. Provides a client interface to a server function. See cts.afterQuery
Parameters:
Name Type Argument Description timestamp
XsUnsignedLong <optional>
A commit timestamp. Database fragments committed after this timestamp are matched. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
andNotQuery(positiveQuery, negativeQuery) → {CtsQuery}
-
Returns a query specifying the set difference of the matches specified by two sub-queries. Provides a client interface to a server function. See cts.andNotQuery
Parameters:
Name Type Argument Description positiveQuery
CtsQuery <optional>
A positive query, specifying the search results filtered in. negativeQuery
CtsQuery <optional>
A negative query, specifying the search results to filter out. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
andQuery(queries, options) → {CtsQuery}
-
Returns a query specifying the intersection of the matches specified by the sub-queries. Provides a client interface to a server function. See cts.andQuery
Parameters:
Name Type Argument Description queries
CtsQuery <optional>
A sequence of sub-queries. options
XsString <optional>
Options to this query. The default is (). Options include: "ordered" An ordered and-query, which specifies that the sub-query matches must occur in the order of the specified sub-queries. For example, if the sub-queries are "cat" and "dog", an ordered query will only match fragments where both "cat" and "dog" occur, and where "cat" comes before "dog" in the fragment. "unordered" An unordered and-query, which specifies that the sub-query matches can occur in any order. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
beforeQuery(timestamp) → {CtsQuery}
-
Returns a query matching fragments committed before or at a specified timestamp. Provides a client interface to a server function. See cts.beforeQuery
Parameters:
Name Type Argument Description timestamp
XsUnsignedLong <optional>
A commit timestamp. Database fragments committed before this timestamp are matched. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
boostQuery(matchingQuery, boostingQuery) → {CtsQuery}
-
Returns a query specifying that matches to matching-query should have their search relevance scores boosted if they also match boosting-query. Provides a client interface to a server function. See cts.boostQuery
Parameters:
Name Type Argument Description matchingQuery
CtsQuery <optional>
A sub-query that is used for match and scoring. boostingQuery
CtsQuery <optional>
A sub-query that is used only for boosting score. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
box(south, west, north, east) → {CtsBox}
-
Returns a geospatial box value. Provides a client interface to a server function. See cts.box
Parameters:
Name Type Argument Description south
XsDouble <optional>
The southern boundary of the box. west
XsDouble <optional>
The western boundary of the box. north
XsDouble <optional>
The northern boundary of the box. east
XsDouble <optional>
The eastern boundary of the box. - Since:
-
- 2.1.1
Returns:
- Type
- CtsBox
-
-
boxEast(box) → {XsNumeric}
-
Returns a box's eastern boundary. Provides a client interface to a server function. See cts.boxEast
Parameters:
Name Type Argument Description box
CtsBox <optional>
The box. - Since:
-
- 2.1.1
Returns:
- Type
- XsNumeric
-
-
boxNorth(box) → {XsNumeric}
-
Returns a box's northern boundary. Provides a client interface to a server function. See cts.boxNorth
Parameters:
Name Type Argument Description box
CtsBox <optional>
The box. - Since:
-
- 2.1.1
Returns:
- Type
- XsNumeric
-
-
boxSouth(box) → {XsNumeric}
-
Returns a box's southern boundary. Provides a client interface to a server function. See cts.boxSouth
Parameters:
Name Type Argument Description box
CtsBox <optional>
The box. - Since:
-
- 2.1.1
Returns:
- Type
- XsNumeric
-
-
boxWest(box) → {XsNumeric}
-
Returns a box's western boundary. Provides a client interface to a server function. See cts.boxWest
Parameters:
Name Type Argument Description box
CtsBox <optional>
The box. - Since:
-
- 2.1.1
Returns:
- Type
- XsNumeric
-
-
circle(radius, center) → {CtsCircle}
-
Returns a geospatial circle value. Provides a client interface to a server function. See cts.circle
Parameters:
Name Type Argument Description radius
XsDouble <optional>
The radius of the circle. The units for the radius is determined at runtime by the query options (miles is currently the only option). center
CtsPoint <optional>
A point representing the center of the circle. - Since:
-
- 2.1.1
Returns:
- Type
- CtsCircle
-
-
circleCenter(circle) → {CtsPoint}
-
Returns a circle's center point. Provides a client interface to a server function. See cts.circleCenter
Parameters:
Name Type Argument Description circle
CtsCircle <optional>
The circle. - Since:
-
- 2.1.1
Returns:
- Type
- CtsPoint
-
-
circleRadius(circle) → {XsNumeric}
-
Returns a circle's radius. Provides a client interface to a server function. See cts.circleRadius
Parameters:
Name Type Argument Description circle
CtsCircle <optional>
The circle. - Since:
-
- 2.1.1
Returns:
- Type
- XsNumeric
-
-
collectionQuery(uris) → {CtsQuery}
-
Match documents in at least one of the specified collections. It will match both documents and properties documents in the collections with the given URIs. Provides a client interface to a server function. See cts.collectionQuery
Parameters:
Name Type Argument Description uris
XsString <optional>
One or more collection URIs. A document matches the query if it is in at least one of these collections. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
collectionReference(options) → {CtsReference}
-
Creates a reference to the collection lexicon, for use as a parameter to cts:value-tuples. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. Provides a client interface to a server function. See cts.collectionReference
Parameters:
Name Type Argument Description options
XsString <optional>
Options. The default is (). Options include: "nullable" Allow null values in tuples reported from cts:value-tuples when using this lexicon. "unchecked" Do not check the definition against the context database. - Since:
-
- 2.1.1
Returns:
- Type
- CtsReference
-
-
complexPolygon(outer, inner) → {CtsComplexPolygon}
-
Returns a geospatial complex polygon value. Provides a client interface to a server function. See cts.complexPolygon
Parameters:
Name Type Argument Description outer
CtsPolygon <optional>
The outer polygon. inner
CtsPolygon <optional>
The innner (hole) polygons. - Since:
-
- 2.1.1
Returns:
- Type
- CtsComplexPolygon
-
-
directoryQuery(uris, depth) → {CtsQuery}
-
Returns a query matching documents in the directories with the given URIs. Provides a client interface to a server function. See cts.directoryQuery
Parameters:
Name Type Argument Description uris
XsString <optional>
One or more directory URIs. depth
XsString <optional>
"1" for immediate children, "infinity" for all. If not supplied, depth is "1". - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
documentFragmentQuery(query) → {CtsQuery}
-
Returns a query that matches all documents where query matches any document fragment. When searching documents, document-properties, or document-locks, this function provides a convenient way to additionally constrain the search against any document fragment. Provides a client interface to a server function. See cts.documentFragmentQuery
Parameters:
Name Type Argument Description query
CtsQuery <optional>
A query to be matched against any document fragment. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
documentQuery(uris) → {CtsQuery}
-
Returns a query matching documents with the given URIs. It will match both documents and properties documents with the given URIs. Provides a client interface to a server function. See cts.documentQuery
Parameters:
Name Type Argument Description uris
XsString <optional>
One or more document URIs. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
elementAttributePairGeospatialQuery(elementName, latitudeName, longitudeName, region, options, weight) → {CtsQuery}
-
Returns a query matching elements by name which has specific attributes representing latitude and longitude values for a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. Provides a client interface to a server function. See cts.elementAttributePairGeospatialQuery
Parameters:
Name Type Argument Description elementName
XsQName <optional>
One or more parent element QNames to match. When multiple QNames are specified, the query matches if any QName matches. latitudeName
XsQName <optional>
One or more latitude attribute QNames to match. When multiple QNames are specified, the query matches if any QName matches; however, only the first matching latitude attribute in any point instance will be checked. longitudeName
XsQName <optional>
One or more longitude attribute QNames to match. When multiple QNames are specified, the query matches if any QName matches; however, only the first matching longitude attribute in any point instance will be checked. region
CtsRegion <optional>
One or more geographic boxes, circles, polygons, or points. Where multiple regions are specified, the query matches if any region matches. options
XsString <optional>
Options to this query. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system. wgs84/doubleThe WGS84 coordinate system at double precision. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. "units=value" Measure distance and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters. "boundaries-included" Points on boxes', circles', and polygons' boundaries are counted as matching. This is the default. "boundaries-excluded" Points on boxes', circles', and polygons' boundaries are not counted as matching. "boundaries-latitude-excluded" Points on boxes' latitude boundaries are not counted as matching. "boundaries-longitude-excluded" Points on boxes' longitude boundaries are not counted as matching. "boundaries-south-excluded" Points on the boxes' southern boundaries are not counted as matching. "boundaries-west-excluded" Points on the boxes' western boundaries are not counted as matching. "boundaries-north-excluded" Points on the boxes' northern boundaries are not counted as matching. "boundaries-east-excluded" Points on the boxes' eastern boundaries are not counted as matching. "boundaries-circle-excluded" Points on circles' boundary are not counted as matching. "boundaries-endpoints-excluded" Points on linestrings' boundary (the endpoints) are not counted as matching. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $regions parameter are considered synonyms for scoring purposes. The result is that occurances of more than one of the synonyms are scored as if there are more occurance of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
elementAttributeRangeQuery(elementName, attributeName, operator, value, options, weight) → {CtsQuery}
-
Constructs a query that matches element-attributes by name with a range-index entry equal to a given value. An element attribute range index on the specified QName(s) must exist when you use this query in a search; if no such range index exists, the search throws an exception. Provides a client interface to a server function. See cts.elementAttributeRangeQuery
Parameters:
Name Type Argument Description elementName
XsQName <optional>
One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. attributeName
XsQName <optional>
One or more attribute QNames to match. When multiple QNames are specified, the query matches if any QName matches. operator
XsString <optional>
A comparison operator. Operators include: "<" Match range index values less than $value. "<=" Match range index values less than or equal to $value. ">" Match range index values greater than $value. ">=" Match range index values greater than or equal to $value. "=" Match range index values equal to $value. "!=" Match range index values not equal to $value. value
XsAnyAtomicType <optional>
Some values to match. When multiple values are specified, the query matches if any value matches. options
XsString <optional>
Options to this query. The default is (). Options include: "collation=URI" Use the range index with the collation specified by URI. If not specified, then the default collation from the query is used. If a range index with the specified collation does not exist, an error is thrown. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "cached-incremental" When querying on a short date or dateTime range, break the query into sub-queries on smaller ranges, and then cache the results of each. See the Usage Notes for details. "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $value parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
elementAttributeReference(element, attribute, options) → {CtsReference}
-
Creates a reference to an element attribute value lexicon, for use as a parameter to cts:value-tuples. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. Provides a client interface to a server function. See cts.elementAttributeReference
Parameters:
Name Type Argument Description element
XsQName <optional>
An element QName. attribute
XsQName <optional>
An attribute QName. options
XsString <optional>
Options. The default is (). Options include: "type=type" Use the lexicon with the type specified by type (int, unsignedInt, long, unsignedLong, float, double, decimal, dateTime, time, date, gYearMonth, gYear, gMonth, gDay, yearMonthDuration, dayTimeDuration, string, anyURI, point, or long-lat-point) "collation=URI" Use the lexicon with the collation specified by URI. "nullable" Allow null values in tuples reported from cts:value-tuples when using this lexicon. "unchecked" Read the scalar type, collation and coordinate-system info only from the input. Do not check the definition against the context database. "coordinate-system=name" Create a reference to an index or lexicon based on the specified coordinate system. Allowed values: "wgs84", "wgs84/double", "raw", "raw/double". Only applicable if the index/lexicon value type is point or long-lat-point. "precision=value" Create a reference to an index or lexicon configured with the specified geospatial precision. Allowed values: float and double. Only applicable if the index/lexicon value type is point or long-lat-point. This value takes precedence over the precision implicit in the coordinate system name. - Since:
-
- 2.1.1
Returns:
- Type
- CtsReference
-
-
elementAttributeValueQuery(elementName, attributeName, text, options, weight) → {CtsQuery}
-
Returns a query matching elements by name with attributes by name with text content equal a given phrase. Provides a client interface to a server function. See cts.elementAttributeValueQuery
Parameters:
Name Type Argument Description elementName
XsQName <optional>
One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. attributeName
XsQName <optional>
One or more attribute QNames to match. When multiple QNames are specified, the query matches if any QName matches. text
XsString <optional>
One or more attribute values to match. When multiple strings are specified, the query matches if any string matches. options
XsString <optional>
Options to this query. The default is (). Options include: "case-sensitive" A case-sensitive query. "case-insensitive" A case-insensitive query. "diacritic-sensitive" A diacritic-sensitive query. "diacritic-insensitive" A diacritic-insensitive query. "punctuation-sensitive" A punctuation-sensitive query. "punctuation-insensitive" A punctuation-insensitive query. "whitespace-sensitive" A whitespace-sensitive query. "whitespace-insensitive" A whitespace-insensitive query. "stemmed" A stemmed query. "unstemmed" An unstemmed query. "wildcarded" A wildcarded query. "unwildcarded" An unwildcarded query. "exact" An exact match query. Shorthand for "case-sensitive", "diacritic-sensitive", "punctuation-sensitive", "whitespace-sensitive", "unstemmed", and "unwildcarded". "lang=iso639code" Specifies the language of the query. The iso639code code portion is case-insensitive, and uses the languages specified by ISO 639. The default is specified in the database configuration. "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "synonym" Specifies that all of the terms in the $text parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). * "lexicon-expansion-limit=number" Specifies the limit for lexicon expansion. This puts a restriction on the number of lexicon expansions that can be performed. If the limit is exceeded, the server may raise an error depending on whether the "limit-check" option is set. The default value for this option will be 4096. "limit-check" Specifies that an error will be raised if the lexicon expansion exceeds the specified limit. "no-limit-check" Specifies that error will not be raised if the lexicon expansion exceeds the specified limit. The server will try to resolve the wildcard. weight
XsDouble <optional>
A weight for this query. Higher weights move search results up in the relevance order. The default is 1.0. The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. Weights less than the absolute value of 0.0625 (between -0.0625 and 0.0625) are rounded to 0, which means that they do not contribute to the score. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
elementAttributeWordQuery(elementName, attributeName, text, options, weight) → {CtsQuery}
-
Returns a query matching elements by name with attributes by name with text content containing a given phrase. Provides a client interface to a server function. See cts.elementAttributeWordQuery
Parameters:
Name Type Argument Description elementName
XsQName <optional>
One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. attributeName
XsQName <optional>
One or more attribute QNames to match. When multiple QNames are specified, the query matches if any QName matches. text
XsString <optional>
Some words or phrases to match. When multiple strings are specified, the query matches if any string matches. options
XsString <optional>
Options to this query. The default is (). Options include: "case-sensitive" A case-sensitive query. "case-insensitive" A case-insensitive query. "diacritic-sensitive" A diacritic-sensitive query. "diacritic-insensitive" A diacritic-insensitive query. "punctuation-sensitive" A punctuation-sensitive query. "punctuation-insensitive" A punctuation-insensitive query. "whitespace-sensitive" A whitespace-sensitive query. "whitespace-insensitive" A whitespace-insensitive query. "stemmed" A stemmed query. "unstemmed" An unstemmed query. "wildcarded" A wildcarded query. "unwildcarded" An unwildcarded query. "exact" An exact match query. Shorthand for "case-sensitive", "diacritic-sensitive", "punctuation-sensitive", "whitespace-sensitive", "unstemmed", and "unwildcarded". "lang=iso639code" Specifies the language of the query. The iso639code code portion is case-insensitive, and uses the languages specified by ISO 639. The default is specified in the database configuration. "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "synonym" Specifies that all of the terms in the $text parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). "lexicon-expand=value" The value is one of full, prefix-postfix, off, or heuristic (the default is heuristic). An option with a value of lexicon-expand=full specifies that wildcards are resolved by expanding the pattern to words in a lexicon (if there is one available), and turning into a series of cts:word-queries, even if this takes a long time to evaluate. An option with a value of lexicon-expand=prefix-postfix specifies that wildcards are resolved by expanding the pattern to the pre- and postfixes of the words in the word lexicon (if there is one), and turning the query into a series of character queries, even if it takes a long time to evaluate. An option with a value of lexicon-expand=off specifies that wildcards are only resolved by looking up character patterns in the search pattern index, not in the lexicon. An option with a value of lexicon-expand=heuristic, which is the default, specifies that wildcards are resolved by using a series of internal rules, such as estimating the number of lexicon entries that need to be scanned, seeing if the estimate crosses certain thresholds, and (if appropriate), using another way besides lexicon expansion to resolve the query. * "lexicon-expansion-limit=number" Specifies the limit for lexicon expansion. This puts a restriction on the number of lexicon expansions that can be performed. If the limit is exceeded, the server may raise an error depending on whether the "limit-check" option is set. The default value for this option will be 4096. "limit-check" Specifies that an error will be raised if the lexicon expansion exceeds the specified limit. "no-limit-check" Specifies that error will not be raised if the lexicon expansion exceeds the specified limit. The server will try to resolve the wildcard. weight
XsDouble <optional>
A weight for this query. Higher weights move search results up in the relevance order. The default is 1.0. The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. Weights less than the absolute value of 0.0625 (between -0.0625 and 0.0625) are rounded to 0, which means that they do not contribute to the score. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
elementChildGeospatialQuery(elementName, childName, region, options, weight) → {CtsQuery}
-
Returns a query matching elements by name which has specific element children representing latitude and longitude values for a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. Provides a client interface to a server function. See cts.elementChildGeospatialQuery
Parameters:
Name Type Argument Description elementName
XsQName <optional>
One or more parent element QNames to match. When multiple QNames are specified, the query matches if any QName matches. childName
XsQName <optional>
One or more child element QNames to match. When multiple QNames are specified, the query matches if any QName matches; however, only the first matching latitude child in any point instance will be checked. The element must specify both latitude and longitude coordinates. region
CtsRegion <optional>
One or more geographic boxes, circles, polygons, or points. Where multiple regions are specified, the query matches if any region matches. options
XsString <optional>
Options to this query. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system. wgs84/doubleThe WGS84 coordinate system at double precision. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=string" Use the coordinate system at the given precision. Allowed values: float (default) and double. "units=value" Measure distance and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters. "boundaries-included" Points on boxes', circles', and polygons' boundaries are counted as matching. This is the default. "boundaries-excluded" Points on boxes', circles', and polygons' boundaries are not counted as matching. "boundaries-latitude-excluded" Points on boxes' latitude boundaries are not counted as matching. "boundaries-longitude-excluded" Points on boxes' longitude boundaries are not counted as matching. "boundaries-south-excluded" Points on the boxes' southern boundaries are not counted as matching. "boundaries-west-excluded" Points on the boxes' western boundaries are not counted as matching. "boundaries-north-excluded" Points on the boxes' northern boundaries are not counted as matching. "boundaries-east-excluded" Points on the boxes' eastern boundaries are not counted as matching. "boundaries-circle-excluded" Points on circles' boundary are not counted as matching. "boundaries-endpoints-excluded" Points on linestrings' boundary (the endpoints) are not counted as matching. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "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-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $regions parameter are considered synonyms for scoring purposes. The result is that occurances of more than one of the synonyms are scored as if there are more occurance of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
elementGeospatialQuery(elementName, region, options, weight) → {CtsQuery}
-
Returns a query matching elements by name whose content represents a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. Provides a client interface to a server function. See cts.elementGeospatialQuery
Parameters:
Name Type Argument Description elementName
XsQName <optional>
One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. region
CtsRegion <optional>
One or more geographic boxes, circles, polygons, or points. Where multiple regions are specified, the query matches if any region matches. options
XsString <optional>
Options to this query. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system. wgs84/doubleThe WGS84 coordinate system at double precision. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. "units=value" Measure distance and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters. "boundaries-included" Points on boxes', circles', and polygons' boundaries are counted as matching. This is the default. "boundaries-excluded" Points on boxes', circles', and polygons' boundaries are not counted as matching. "boundaries-latitude-excluded" Points on boxes' latitude boundaries are not counted as matching. "boundaries-longitude-excluded" Points on boxes' longitude boundaries are not counted as matching. "boundaries-south-excluded" Points on the boxes' southern boundaries are not counted as matching. "boundaries-west-excluded" Points on the boxes' western boundaries are not counted as matching. "boundaries-north-excluded" Points on the boxes' northern boundaries are not counted as matching. "boundaries-east-excluded" Points on the boxes' eastern boundaries are not counted as matching. "boundaries-circle-excluded" Points on circles' boundary are not counted as matching. "boundaries-endpoints-excluded" Points on linestrings' boundary (the endpoints) are not counted as matching. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "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-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $regions parameter are considered synonyms for scoring purposes. The result is that occurances of more than one of the synonyms are scored as if there are more occurance of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
elementPairGeospatialQuery(elementName, latitudeName, longitudeName, region, options, weight) → {CtsQuery}
-
Returns a query matching elements by name which has specific element children representing latitude and longitude values for a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. Provides a client interface to a server function. See cts.elementPairGeospatialQuery
Parameters:
Name Type Argument Description elementName
XsQName <optional>
One or more parent element QNames to match. When multiple QNames are specified, the query matches if any QName matches. latitudeName
XsQName <optional>
One or more latitude element QNames to match. When multiple QNames are specified, the query matches if any QName matches; however, only the first matching latitude child in any point instance will be checked. longitudeName
XsQName <optional>
One or more longitude element QNames to match. When multiple QNames are specified, the query matches if any QName matches; however, only the first matching longitude child in any point instance will be checked. region
CtsRegion <optional>
One or more geographic boxes, circles, polygons, or points. Where multiple regions are specified, the query matches if any region matches. options
XsString <optional>
Options to this query. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system. wgs84/doubleThe WGS84 coordinate system at double precision. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. "units=value" Measure distance and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters. "boundaries-included" Points on boxes', circles', and polygons' boundaries are counted as matching. This is the default. "boundaries-excluded" Points on boxes', circles', and polygons' boundaries are not counted as matching. "boundaries-latitude-excluded" Points on boxes' latitude boundaries are not counted as matching. "boundaries-longitude-excluded" Points on boxes' longitude boundaries are not counted as matching. "boundaries-south-excluded" Points on the boxes' southern boundaries are not counted as matching. "boundaries-west-excluded" Points on the boxes' western boundaries are not counted as matching. "boundaries-north-excluded" Points on the boxes' northern boundaries are not counted as matching. "boundaries-east-excluded" Points on the boxes' eastern boundaries are not counted as matching. "boundaries-circle-excluded" Points on circles' boundary are not counted as matching. "boundaries-endpoints-excluded" Points on linestrings' boundary (the endpoints) are not counted as matching. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $regions parameter are considered synonyms for scoring purposes. The result is that occurances of more than one of the synonyms are scored as if there are more occurance of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
elementQuery(elementName, query) → {CtsQuery}
-
Constructs a query that matches elements by name with the content constrained by the query given in the second parameter. Searches for matches in the specified element and all of its descendants. If the query specified in the second parameter includes any element attribute sub-queries, it will search attributes on the specified element and attributes on any descendant elements. See the second example below). Provides a client interface to a server function. See cts.elementQuery
Parameters:
Name Type Argument Description elementName
XsQName <optional>
One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. query
CtsQuery <optional>
A query for the element to match. If a string is entered, the string is treated as a cts:word-query of the specified string. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
elementRangeQuery(elementName, operator, value, options, weight) → {CtsQuery}
-
Constructs a query that matches elements by name with range index entry equal to a given value. Searches that use an element range query require an element range index on the specified QName(s); if no such range index exists, then an exception is thrown. Provides a client interface to a server function. See cts.elementRangeQuery
Parameters:
Name Type Argument Description elementName
XsQName <optional>
One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. operator
XsString <optional>
A comparison operator. Operators include: "<" Match range index values less than $value. "<=" Match range index values less than or equal to $value. ">" Match range index values greater than $value. ">=" Match range index values greater than or equal to $value. "=" Match range index values equal to $value. "!=" Match range index values not equal to $value. value
XsAnyAtomicType <optional>
One or more element values to match. When multiple values are specified, the query matches if any value matches. options
XsString <optional>
Options to this query. The default is (). Options include: "collation=URI" Use the range index with the collation specified by URI. If not specified, then the default collation from the query is used. If a range index with the specified collation does not exist, an error is thrown. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "cached-incremental" When querying on a short date or dateTime range, break the query into sub-queries on smaller ranges, and then cache the results of each. See the Usage Notes for details. "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $value parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
elementReference(element, options) → {CtsReference}
-
Creates a reference to an element value lexicon, for use as a parameter to cts:value-tuples, temporal:axis-create, or any other function that takes an index reference. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. Provides a client interface to a server function. See cts.elementReference
Parameters:
Name Type Argument Description element
XsQName <optional>
An element QName. options
XsString <optional>
Options. The default is (). Options include: "type=type" Use the lexicon with the type specified by type (int, unsignedInt, long, unsignedLong, float, double, decimal, dateTime, time, date, gYearMonth, gYear, gMonth, gDay, yearMonthDuration, dayTimeDuration, string, anyURI, point, or long-lat-point) "collation=URI" Use the lexicon with the collation specified by URI. "nullable" Allow null values in tuples reported from cts:value-tuples when using this lexicon. "unchecked" Read the scalar type, collation and coordinate-system info only from the input. Do not check the definition against the context database. "coordinate-system=name" Create a reference to an index or lexicon based on the specified coordinate system. Allowed values: "wgs84", "wgs84/double", "raw", "raw/double". Only applicable if the index/lexicon value type is point or long-lat-point. "precision=value" Create a reference to an index or lexicon configured with the specified geospatial precision. Allowed values: float and double. Only applicable if the index/lexicon value type is point or long-lat-point. This value takes precedence over the precision implicit in the coordinate system name. - Since:
-
- 2.1.1
Returns:
- Type
- CtsReference
-
-
elementValueQuery(elementName, text, options, weight) → {CtsQuery}
-
Returns a query matching elements by name with text content equal a given phrase. cts:element-value-query only matches against simple elements (that is, elements that contain only text and have no element children). Provides a client interface to a server function. See cts.elementValueQuery
Parameters:
Name Type Argument Description elementName
XsQName <optional>
One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. text
XsString <optional>
One or more element values to match. When multiple strings are specified, the query matches if any string matches. options
XsString <optional>
Options to this query. The default is (). Options include: "case-sensitive" A case-sensitive query. "case-insensitive" A case-insensitive query. "diacritic-sensitive" A diacritic-sensitive query. "diacritic-insensitive" A diacritic-insensitive query. "punctuation-sensitive" A punctuation-sensitive query. "punctuation-insensitive" A punctuation-insensitive query. "whitespace-sensitive" A whitespace-sensitive query. "whitespace-insensitive" A whitespace-insensitive query. "stemmed" A stemmed query. "unstemmed" An unstemmed query. "wildcarded" A wildcarded query. "unwildcarded" An unwildcarded query. "exact" An exact match query. Shorthand for "case-sensitive", "diacritic-sensitive", "punctuation-sensitive", "whitespace-sensitive", "unstemmed", and "unwildcarded". "lang=iso639code" Specifies the language of the query. The iso639code code portion is case-insensitive, and uses the languages specified by ISO 639. The default is specified in the database configuration. "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "synonym" Specifies that all of the terms in the $text parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). "lexicon-expansion-limit=number" Specifies the limit for lexicon expansion. This puts a restriction on the number of lexicon expansions that can be performed. If the limit is exceeded, the server may raise an error depending on whether the "limit-check" option is set. The default value for this option will be 4096. "limit-check" Specifies that an error will be raised if the lexicon expansion exceeds the specified limit. "no-limit-check" Specifies that error will not be raised if the lexicon expansion exceeds the specified limit. The server will try to resolve the wildcard. weight
XsDouble <optional>
A weight for this query. Higher weights move search results up in the relevance order. The default is 1.0. The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. Weights less than the absolute value of 0.0625 (between -0.0625 and 0.0625) are rounded to 0, which means that they do not contribute to the score. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
elementWordQuery(elementName, text, options, weight) → {CtsQuery}
-
Returns a query matching elements by name with text content containing a given phrase. Searches only through immediate text node children of the specified element as well as any text node children of child elements defined in the Admin Interface as element-word-query-throughs or phrase-throughs; does not search through any other children of the specified element. Provides a client interface to a server function. See cts.elementWordQuery
Parameters:
Name Type Argument Description elementName
XsQName <optional>
One or more element QNames to match. When multiple QNames are specified, the query matches if any QName matches. text
XsString <optional>
Some words or phrases to match. When multiple strings are specified, the query matches if any string matches. options
XsString <optional>
Options to this query. The default is (). Options include: "case-sensitive" A case-sensitive query. "case-insensitive" A case-insensitive query. "diacritic-sensitive" A diacritic-sensitive query. "diacritic-insensitive" A diacritic-insensitive query. "punctuation-sensitive" A punctuation-sensitive query. "punctuation-insensitive" A punctuation-insensitive query. "whitespace-sensitive" A whitespace-sensitive query. "whitespace-insensitive" A whitespace-insensitive query. "stemmed" A stemmed query. "unstemmed" An unstemmed query. "wildcarded" A wildcarded query. "unwildcarded" An unwildcarded query. "exact" An exact match query. Shorthand for "case-sensitive", "diacritic-sensitive", "punctuation-sensitive", "whitespace-sensitive", "unstemmed", and "unwildcarded". "lang=iso639code" Specifies the language of the query. The iso639code code portion is case-insensitive, and uses the languages specified by ISO 639. The default is specified in the database configuration. "distance-weight=number" A weight applied based on the minimum distance between matches of this query. Higher weights add to the importance of proximity (as opposed to term matches) when the relevance order is calculated. The default value is 0.0 (no impact of proximity). The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. This parameter has no effect if the word positions index is not enabled. This parameter has no effect on searches that use score-simple, score-random, or score-zero (because those scoring algorithms do not consider term frequency, proximity is irrelevant). "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "synonym" Specifies that all of the terms in the $text parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). "lexicon-expand=value" The value is one of full, prefix-postfix, off, or heuristic (the default is heuristic). An option with a value of lexicon-expand=full specifies that wildcards are resolved by expanding the pattern to words in a lexicon (if there is one available), and turning into a series of cts:word-queries, even if this takes a long time to evaluate. An option with a value of lexicon-expand=prefix-postfix specifies that wildcards are resolved by expanding the pattern to the pre- and postfixes of the words in the word lexicon (if there is one), and turning the query into a series of character queries, even if it takes a long time to evaluate. An option with a value of lexicon-expand=off specifies that wildcards are only resolved by looking up character patterns in the search pattern index, not in the lexicon. An option with a value of lexicon-expand=heuristic, which is the default, specifies that wildcards are resolved by using a series of internal rules, such as estimating the number of lexicon entries that need to be scanned, seeing if the estimate crosses certain thresholds, and (if appropriate), using another way besides lexicon expansion to resolve the query. * "lexicon-expansion-limit=number" Specifies the limit for lexicon expansion. This puts a restriction on the number of lexicon expansions that can be performed. If the limit is exceeded, the server may raise an error depending on whether the "limit-check" option is set. The default value for this option will be 4096. "limit-check" Specifies that an error will be raised if the lexicon expansion exceeds the specified limit. "no-limit-check" Specifies that error will not be raised if the lexicon expansion exceeds the specified limit. The server will try to resolve the wildcard. weight
XsDouble <optional>
A weight for this query. Higher weights move search results up in the relevance order. The default is 1.0. The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. Weights less than the absolute value of 0.0625 (between -0.0625 and 0.0625) are rounded to 0, which means that they do not contribute to the score. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
falseQuery() → {CtsQuery}
-
Returns a query that matches no fragments. Provides a client interface to a server function. See cts.falseQuery
- Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
fieldRangeQuery(fieldName, operator, value, options, weight) → {CtsQuery}
-
Returns a cts:query matching fields by name with a range-index entry equal to a given value. Searches with the cts:field-range-query constructor require a field range index on the specified field name(s); if there is no range index configured, then an exception is thrown. Provides a client interface to a server function. See cts.fieldRangeQuery
Parameters:
Name Type Argument Description fieldName
XsString <optional>
One or more field names to match. When multiple field names are specified, the query matches if any field name matches. operator
XsString <optional>
A comparison operator. Operators include: "<" Match range index values less than $value. "<=" Match range index values less than or equal to $value. ">" Match range index values greater than $value. ">=" Match range index values greater than or equal to $value. "=" Match range index values equal to $value. "!=" Match range index values not equal to $value. value
XsAnyAtomicType <optional>
One or more field values to match. When multiple values are specified, the query matches if any value matches. The value must be a type for which there is a range index defined. options
XsString <optional>
Options to this query. The default is (). Options include: "collation=URI" Use the range index with the collation specified by URI. If not specified, then the default collation from the query is used. If a range index with the specified collation does not exist, an error is thrown. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "cached-incremental" When querying on a short date or dateTime range, break the query into sub-queries on smaller ranges, and then cache the results of each. See the Usage Notes for details. "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $value parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
fieldReference(field, options) → {CtsReference}
-
Creates a reference to a field value lexicon, for use as a parameter to cts:value-tuples. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. Provides a client interface to a server function. See cts.fieldReference
Parameters:
Name Type Argument Description field
XsString <optional>
A field name. options
XsString <optional>
Options. The default is (). Options include: "type=type" Use the lexicon with the type specified by type (int, unsignedInt, long, unsignedLong, float, double, decimal, dateTime, time, date, gYearMonth, gYear, gMonth, gDay, yearMonthDuration, dayTimeDuration, string, anyURI, point, or long-lat-point) "collation=URI" Use the lexicon with the collation specified by URI. "nullable" Allow null values in tuples reported from cts:value-tuples when using this lexicon. "unchecked" Read the scalar type, collation and coordinate-system info only from the input. Do not check the definition against the context database. "coordinate-system=name" Create a reference to an index or lexicon based on the specified coordinate system. Allowed values: "wgs84", "wgs84/double", "raw", "raw/double". Only applicable if the index/lexicon value type is point or long-lat-point. "precision=value" Create a reference to an index or lexicon configured with the specified geospatial precision. Allowed values: float and double. Only applicable if the index/lexicon value type is point or long-lat-point. This value takes precedence over the precision implicit in the coordinate system name. - Since:
-
- 2.1.1
Returns:
- Type
- CtsReference
-
-
fieldValueQuery(fieldName, text, options, weight) → {CtsQuery}
-
Returns a query matching text content containing a given value in the specified field. If the specified field does not exist, cts:field-value-query throws an exception. If the specified field does not have the index setting field value searches enabled, either for the database or for the specified field, then a cts:search with a cts:field-value-query throws an exception. A field is a named object that specified elements to include and exclude from a search, and can include score weights for any included elements. You create fields at the database level using the Admin Interface. For details on fields, see the chapter on "Fields Database Settings" in the Administrator's Guide. Provides a client interface to a server function. See cts.fieldValueQuery
Parameters:
Name Type Argument Description fieldName
XsString <optional>
One or more field names to search over. If multiple field names are supplied, the match can be in any of the specified fields (or-query semantics). text
XsAnyAtomicType <optional>
The values to match. If multiple values are specified, the query matches if any of the values match (or-query semantics). For XML and metadata, the values should be strings. For JSON, the values can be strings, numbers or booleans to match correspondingly typed nodes. To match null, pass in the empty sequence. options
XsString <optional>
Options to this query. The default is (). Options include: "case-sensitive" A case-sensitive query. "case-insensitive" A case-insensitive query. "diacritic-sensitive" A diacritic-sensitive query. "diacritic-insensitive" A diacritic-insensitive query. "punctuation-sensitive" A punctuation-sensitive query. "punctuation-insensitive" A punctuation-insensitive query. "whitespace-sensitive" A whitespace-sensitive query. "whitespace-insensitive" A whitespace-insensitive query. "stemmed" A stemmed query. "unstemmed" An unstemmed query. "wildcarded" A wildcarded query. "unwildcarded" An unwildcarded query. "exact" An exact match query. Shorthand for "case-sensitive", "diacritic-sensitive", "punctuation-sensitive", "whitespace-sensitive", "unstemmed", and "unwildcarded". "lang=iso639code" Specifies the language of the query. The iso639code code portion is case-insensitive, and uses the languages specified by ISO 639. The default is specified in the database configuration. "distance-weight=number" A weight applied based on the minimum distance between matches of this query. Higher weights add to the importance of proximity (as opposed to term matches) when the relevance order is calculated. The default value is 0.0 (no impact of proximity). The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. This parameter has no effect if the word positions index is not enabled. This parameter has no effect on searches that use score-simple or score-random (because those scoring algorithms do not consider term frequency, proximity is irrelevant). "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "synonym" Specifies that all of the terms in the $text parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). "lexicon-expansion-limit=number" Specifies the limit for lexicon expansion. This puts a restriction on the number of lexicon expansions that can be performed. If the limit is exceeded, the server may raise an error depending on whether the "limit-check" option is set. The default value for this option will be 4096. "limit-check" Specifies that an error will be raised if the lexicon expansion exceeds the specified limit. "no-limit-check" Specifies that error will not be raised if the lexicon expansion exceeds the specified limit. The server will try to resolve the wildcard. weight
XsDouble <optional>
A weight for this query. Higher weights move search results up in the relevance order. The default is 1.0. The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. Weights less than the absolute value of 0.0625 (between -0.0625 and 0.0625) are rounded to 0, which means that they do not contribute to the score. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
fieldWordQuery(fieldName, text, options, weight) → {CtsQuery}
-
Returns a query matching fields with text content containing a given phrase. If the specified field does not exist, this function throws an exception. A field is a named object that specified elements to include and exclude from a search, and can include score weights for any included elements. You create fields at the database level using the Admin Interface. For details on fields, see the chapter on "Fields Database Settings" in the Administrator's Guide. Provides a client interface to a server function. See cts.fieldWordQuery
Parameters:
Name Type Argument Description fieldName
XsString <optional>
One or more field names to search over. If multiple field names are supplied, the match can be in any of the specified fields (or-query semantics). text
XsString <optional>
The word or phrase to match. If multiple strings are specified, the query matches if any of the words or phrases match (or-query semantics). options
XsString <optional>
Options to this query. The default is (). Options include: "case-sensitive" A case-sensitive query. "case-insensitive" A case-insensitive query. "diacritic-sensitive" A diacritic-sensitive query. "diacritic-insensitive" A diacritic-insensitive query. "punctuation-sensitive" A punctuation-sensitive query. "punctuation-insensitive" A punctuation-insensitive query. "whitespace-sensitive" A whitespace-sensitive query. "whitespace-insensitive" A whitespace-insensitive query. "stemmed" A stemmed query. "unstemmed" An unstemmed query. "wildcarded" A wildcarded query. "unwildcarded" An unwildcarded query. "exact" An exact match query. Shorthand for "case-sensitive", "diacritic-sensitive", "punctuation-sensitive", "whitespace-sensitive", "unstemmed", and "unwildcarded". "lang=iso639code" Specifies the language of the query. The iso639code code portion is case-insensitive, and uses the languages specified by ISO 639. The default is specified in the database configuration. "distance-weight=number" A weight applied based on the minimum distance between matches of this query. Higher weights add to the importance of proximity (as opposed to term matches) when the relevance order is calculated. The default value is 0.0 (no impact of proximity). The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. This parameter has no effect if the word positions index is not enabled. This parameter has no effect on searches that use score-simple, score-random, or score-zero (because those scoring algorithms do not consider term frequency, proximity is irrelevant). "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "synonym" Specifies that all of the terms in the $text parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). "lexicon-expand=value" The value is one of full, prefix-postfix, off, or heuristic (the default is heuristic). An option with a value of lexicon-expand=full specifies that wildcards are resolved by expanding the pattern to words in a lexicon (if there is one available), and turning into a series of cts:word-queries, even if this takes a long time to evaluate. An option with a value of lexicon-expand=prefix-postfix specifies that wildcards are resolved by expanding the pattern to the pre- and postfixes of the words in the word lexicon (if there is one), and turning the query into a series of character queries, even if it takes a long time to evaluate. An option with a value of lexicon-expand=off specifies that wildcards are only resolved by looking up character patterns in the search pattern index, not in the lexicon. An option with a value of lexicon-expand=heuristic, which is the default, specifies that wildcards are resolved by using a series of internal rules, such as estimating the number of lexicon entries that need to be scanned, seeing if the estimate crosses certain thresholds, and (if appropriate), using another way besides lexicon expansion to resolve the query. "lexicon-expansion-limit=number" Specifies the limit for lexicon expansion. This puts a restriction on the number of lexicon expansions that can be performed. If the limit is exceeded, the server may raise an error depending on whether the "limit-check" option is set. The default value for this option will be 4096. "limit-check" Specifies that an error will be raised if the lexicon expansion exceeds the specified limit. "no-limit-check" Specifies that error will not be raised if the lexicon expansion exceeds the specified limit. The server will try to resolve the wildcard. weight
XsDouble <optional>
A weight for this query. Higher weights move search results up in the relevance order. The default is 1.0. The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. Weights less than the absolute value of 0.0625 (between -0.0625 and 0.0625) are rounded to 0, which means that they do not contribute to the score. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
geospatialPathReference(pathExpression, options, map) → {CtsReference}
-
Creates a reference to a geospatial path range index, for use as a parameter to cts:value-tuples. This function will throw an exception if the specified range index does not exist. Provides a client interface to a server function. See cts.geospatialPathReference
Parameters:
Name Type Argument Description pathExpression
XsString <optional>
A path expression. options
XsString <optional>
Options. The default is (). Options include: "type=type" Use the lexicon with the type specified by type (point or long-lat-point) "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system. wgs84/doubleThe WGS84 coordinate system at double precision. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. "nullable" Allow null values in tuples reported from cts:value-tuples when using this lexicon. "unchecked" Read the scalar type and coordinate-system info only from the input. Do not check the definition against the context database. map
MapMap <optional>
A map of namespace bindings. The keys should be namespace prefixes and the values should be namespace URIs. These namespace bindings will be added to the in-scope namespace bindings in the interpretation of the path. - Since:
-
- 2.1.1
Returns:
- Type
- CtsReference
-
-
geospatialRegionPathReference(pathExpression, options, namespaces) → {CtsReference}
-
Create a reference to a geospatial region path index, for use as a parameter to cts:geospatial-region-query and other query operations on geospatial region indexes. This function throws an exception if the specified region path index does not exist. Provides a client interface to a server function. See cts.geospatialRegionPathReference
Parameters:
Name Type Argument Description pathExpression
XsString <optional>
The XPath expression specified in the index configuration. options
XsString <optional>
Index configuration options. The default is (). These options should match the configuration used when creating the index. Available options: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system. wgs84/doubleThe WGS84 coordinate system at double precision. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=value" Use the coordinate system at the given precision. Allowed values: float (default) and double. "unchecked" Read the coordinate-system info only from the input. Do not check the definition against the context database. namespaces
MapMap <optional>
A map of namespace bindings. The keys should be namespace prefixes and the values should be namespace URIs. These namespace bindings will be added to the in-scope namespace bindings in the interpretation of the path. - Since:
-
- 2.1.1
Returns:
- Type
- CtsReference
-
-
geospatialRegionQuery(reference, operation, region, options, weight) → {CtsQuery}
-
Construct a query to match regions in documents that satisfy a specified relationship relative to other regions. For example, regions in documents that intersect with regions specified in the search criteria. Provides a client interface to a server function. See cts.geospatialRegionQuery
Parameters:
Name Type Argument Description reference
CtsReference <optional>
Zero or more geospatial path region index references that identify regions in your content. To create a reference, see cts:geospatial-region-path-reference. operation
XsString <optional>
The match operation to apply between the regions specified in the $geospatial-region-reference parameter and the regions in the $regions parameter. Allowed values: contains, covered-by, covers, disjoint, intersects, overlaps, within, equals, touches, crosses. See the Usage Notes for details. region
CtsRegion <optional>
Criteria regions to match against the regions specified in the $geospatial-region-reference parameter. These regions function as the right operand of $operation. options
XsString <optional>
Options to this query. The default is (). Available options: "units=value" Measure distances and the radii of circles using the given units. Allowed values: miles (default), km, feet, and meters. This option only affects regions provided in the $regions parameter, not regions stored in documents. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $regions parameter are considered synonyms for scoring purposes. The result is that occurances of more than one of the synonyms are scored as if there are more occurance of the same term (as opposed to having a separate term that contributes to score). "tolerance=distance" Tolerance is the largest allowable variation in geometry calculations. If the distance between two points is less than tolerance, then the two points are considered equal. For the raw coordinate system, use the units of the coordinates. For geographic coordinate systems, use the units specified by the units option. weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
jsonPropertyChildGeospatialQuery(propertyName, childName, region, options, weight) → {CtsQuery}
-
Returns a query matching json properties by name which has specific children representing latitude and longitude values for a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. Provides a client interface to a server function. See cts.jsonPropertyChildGeospatialQuery
Parameters:
Name Type Argument Description propertyName
XsString <optional>
One or more parent property names to match. When multiple names are specified, the query matches if any name matches. childName
XsString <optional>
One or more child property names to match. When multiple names are specified, the query matches if any name matches; however, only the first matching latitude child in any point instance will be checked. The property must specify both latitude and longitude coordinates. region
CtsRegion <optional>
One or more geographic boxes, circles, polygons, or points. Where multiple regions are specified, the query matches if any region matches. options
XsString <optional>
Options to this query. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system. wgs84/doubleThe WGS84 coordinate system at double precision. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=string" Use the coordinate system at the given precision. Allowed values: float (default) and double. "units=value" Measure distance and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters. "boundaries-included" Points on boxes', circles', and polygons' boundaries are counted as matching. This is the default. "boundaries-excluded" Points on boxes', circles', and polygons' boundaries are not counted as matching. "boundaries-latitude-excluded" Points on boxes' latitude boundaries are not counted as matching. "boundaries-longitude-excluded" Points on boxes' longitude boundaries are not counted as matching. "boundaries-south-excluded" Points on the boxes' southern boundaries are not counted as matching. "boundaries-west-excluded" Points on the boxes' western boundaries are not counted as matching. "boundaries-north-excluded" Points on the boxes' northern boundaries are not counted as matching. "boundaries-east-excluded" Points on the boxes' eastern boundaries are not counted as matching. "boundaries-circle-excluded" Points on circles' boundary are not counted as matching. "boundaries-endpoints-excluded" Points on linestrings' boundary (the endpoints) are not counted as matching. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "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-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $regions parameter are considered synonyms for scoring purposes. The result is that occurances of more than one of the synonyms are scored as if there are more occurance of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
jsonPropertyGeospatialQuery(propertyName, region, options, weight) → {CtsQuery}
-
Returns a query matching json properties by name whose content represents a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. Provides a client interface to a server function. See cts.jsonPropertyGeospatialQuery
Parameters:
Name Type Argument Description propertyName
XsString <optional>
One or more json property names to match. When multiple names are specified, the query matches if any name matches. region
CtsRegion <optional>
One or more geographic boxes, circles, polygons, or points. Where multiple regions are specified, the query matches if any region matches. options
XsString <optional>
Options to this query. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system. wgs84/doubleThe WGS84 coordinate system at double precision. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=string" Use the coordinate system at the given precision. Allowed values: float (default) and double. "units=value" Measure distance and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters. "boundaries-included" Points on boxes', circles', and polygons' boundaries are counted as matching. This is the default. "boundaries-excluded" Points on boxes', circles', and polygons' boundaries are not counted as matching. "boundaries-latitude-excluded" Points on boxes' latitude boundaries are not counted as matching. "boundaries-longitude-excluded" Points on boxes' longitude boundaries are not counted as matching. "boundaries-south-excluded" Points on the boxes' southern boundaries are not counted as matching. "boundaries-west-excluded" Points on the boxes' western boundaries are not counted as matching. "boundaries-north-excluded" Points on the boxes' northern boundaries are not counted as matching. "boundaries-east-excluded" Points on the boxes' eastern boundaries are not counted as matching. "boundaries-circle-excluded" Points on circles' boundary are not counted as matching. "boundaries-endpoints-excluded" Points on linestrings' boundary (the endpoints) are not counted as matching. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "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-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $regions parameter are considered synonyms for scoring purposes. The result is that occurances of more than one of the synonyms are scored as if there are more occurance of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
jsonPropertyPairGeospatialQuery(propertyName, latitudeName, longitudeName, region, options, weight) → {CtsQuery}
-
Returns a query matching json properties by name which has specific property children representing latitude and longitude values for a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. Provides a client interface to a server function. See cts.jsonPropertyPairGeospatialQuery
Parameters:
Name Type Argument Description propertyName
XsString <optional>
One or more parent property names to match. When multiple names are specified, the query matches if any name matches. latitudeName
XsString <optional>
One or more latitude property names to match. When multiple names are specified, the query matches if any name matches; however, only the first matching latitude child in any point instance will be checked. longitudeName
XsString <optional>
One or more longitude property names to match. When multiple names are specified, the query matches if any name matches; however, only the first matching longitude child in any point instance will be checked. region
CtsRegion <optional>
One or more geographic boxes, circles, polygons, or points. Where multiple regions are specified, the query matches if any region matches. options
XsString <optional>
Options to this query. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system. wgs84/doubleThe WGS84 coordinate system at double precision. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. "units=value" Measure distance and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters. "boundaries-included" Points on boxes', circles', and polygons' boundaries are counted as matching. This is the default. "boundaries-excluded" Points on boxes', circles', and polygons' boundaries are not counted as matching. "boundaries-latitude-excluded" Points on boxes' latitude boundaries are not counted as matching. "boundaries-longitude-excluded" Points on boxes' longitude boundaries are not counted as matching. "boundaries-south-excluded" Points on the boxes' southern boundaries are not counted as matching. "boundaries-west-excluded" Points on the boxes' western boundaries are not counted as matching. "boundaries-north-excluded" Points on the boxes' northern boundaries are not counted as matching. "boundaries-east-excluded" Points on the boxes' eastern boundaries are not counted as matching. "boundaries-circle-excluded" Points on circles' boundary are not counted as matching. "boundaries-endpoints-excluded" Points on linestrings' boundary (the endpoints) are not counted as matching. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $regions parameter are considered synonyms for scoring purposes. The result is that occurances of more than one of the synonyms are scored as if there are more occurance of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
jsonPropertyRangeQuery(propertyName, operator, value, options, weight) → {CtsQuery}
-
Returns a cts:query matching JSON properties by name with a range-index entry equal to a given value. Searches with the cts:json-property-range-query constructor require a property range index on the specified names; if there is no range index configured, then an exception is thrown. Provides a client interface to a server function. See cts.jsonPropertyRangeQuery
Parameters:
Name Type Argument Description propertyName
XsString <optional>
One or more property name to match. When multiple names are specified, the query matches if any name matches. operator
XsString <optional>
A comparison operator. Operators include: "<" Match range index values less than $value. "<=" Match range index values less than or equal to $value. ">" Match range index values greater than $value. ">=" Match range index values greater than or equal to $value. "=" Match range index values equal to $value. "!=" Match range index values not equal to $value. value
XsAnyAtomicType <optional>
One or more property values to match. When multiple values are specified, the query matches if any value matches. The value must be a type for which there is a range index defined. options
XsString <optional>
Options to this query. The default is (). Options include: "collation=URI" Use the range index with the collation specified by URI. If not specified, then the default collation from the query is used. If a range index with the specified collation does not exist, an error is thrown. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "cached-incremental" When querying on a short date or dateTime range, break the query into sub-queries on smaller ranges, and then cache the results of each. See the Usage Notes for details. "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $value parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
jsonPropertyReference(property, options) → {CtsReference}
-
Creates a reference to a JSON property value lexicon, for use as a parameter to cts:value-tuples. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. Provides a client interface to a server function. See cts.jsonPropertyReference
Parameters:
Name Type Argument Description property
XsString <optional>
A property name. options
XsString <optional>
Options. The default is (). Options include: "type=type" Use the lexicon with the type specified by type (int, unsignedInt, long, unsignedLong, float, double, decimal, dateTime, time, date, gYearMonth, gYear, gMonth, gDay, yearMonthDuration, dayTimeDuration, string, anyURI, point, or long-lat-point) "collation=URI" Use the lexicon with the collation specified by URI. "nullable" Allow null values in tuples reported from cts:value-tuples when using this lexicon. "unchecked" Read the scalar type, collation and coordinate-system info only from the input. Do not check the definition against the context database. "coordinate-system=name" Create a reference to an index or lexicon based on the specified coordinate system. Allowed values: "wgs84", "wgs84/double", "raw", "raw/double". Only applicable if the index/lexicon value type is point or long-lat-point. "precision=value" Create a reference to an index or lexicon configured with the specified geospatial precision. Allowed values: float and double. Only applicable if the index/lexicon value type is point or long-lat-point. This value takes precedence over the precision implicit in the coordinate system name. - Since:
-
- 2.1.1
Returns:
- Type
- CtsReference
-
-
jsonPropertyScopeQuery(propertyName, query) → {CtsQuery}
-
Returns a cts:query matching JSON properties by name with the content constrained by the given cts:query in the second parameter. Searches for matches in the specified property and all of its descendants. Provides a client interface to a server function. See cts.jsonPropertyScopeQuery
Parameters:
Name Type Argument Description propertyName
XsString <optional>
One or more property names to match. When multiple names are specified, the query matches if any name matches. query
CtsQuery <optional>
A query for the property to match. If a string is entered, the string is treated as a cts:word-query of the specified string. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
jsonPropertyValueQuery(propertyName, value, options, weight) → {CtsQuery}
-
Returns a query matching JSON properties by name with value equal the given value. For arrays, the query matches if the value of any elements in the array matches the given value. Provides a client interface to a server function. See cts.jsonPropertyValueQuery
Parameters:
Name Type Argument Description propertyName
XsString <optional>
One or more property names to match. When multiple names are specified, the query matches if any name matches. value
XsAnyAtomicType <optional>
One or more property values to match. When multiple values are specified, the query matches if any value matches. The values can be strings, numbers or booleans to match correspondingly typed nodes. If the value is the empty sequence, the query matches null. options
XsString <optional>
Options to this query. The default is (). Options include: "case-sensitive" A case-sensitive query. "case-insensitive" A case-insensitive query. "diacritic-sensitive" A diacritic-sensitive query. "diacritic-insensitive" A diacritic-insensitive query. "punctuation-sensitive" A punctuation-sensitive query. "punctuation-insensitive" A punctuation-insensitive query. "whitespace-sensitive" A whitespace-sensitive query. "whitespace-insensitive" A whitespace-insensitive query. "stemmed" A stemmed query. "unstemmed" An unstemmed query. "wildcarded" A wildcarded query. "unwildcarded" An unwildcarded query. "exact" An exact match query. Shorthand for "case-sensitive", "diacritic-sensitive", "punctuation-sensitive", "whitespace-sensitive", "unstemmed", and "unwildcarded". "lang=iso639code" Specifies the language of the query. The iso639code code portion is case-insensitive, and uses the languages specified by ISO 639. The default is specified in the database configuration. "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "synonym" Specifies that all of the terms in the $text parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). "lexicon-expansion-limit=number" Specifies the limit for lexicon expansion. This puts a restriction on the number of lexicon expansions that can be performed. If the limit is exceeded, the server may raise an error depending on whether the "limit-check" option is set. The default value for this option will be 4096. "limit-check" Specifies that an error will be raised if the lexicon expansion exceeds the specified limit. "no-limit-check" Specifies that error will not be raised if the lexicon expansion exceeds the specified limit. The server will try to resolve the wildcard. weight
XsDouble <optional>
A weight for this query. Higher weights move search results up in the relevance order. The default is 1.0. The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. Weights less than the absolute value of 0.0625 (between -0.0625 and 0.0625) are rounded to 0, which means that they do not contribute to the score. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
jsonPropertyWordQuery(propertyName, text, options, weight) → {CtsQuery}
-
Returns a query matching JSON properties by name with text content containing a given phrase. Searches only through immediate text node children of the specified property. Provides a client interface to a server function. See cts.jsonPropertyWordQuery
Parameters:
Name Type Argument Description propertyName
XsString <optional>
One or more JSON property names to match. When multiple names are specified, the query matches if any name matches. text
XsString <optional>
Some words or phrases to match. When multiple strings are specified, the query matches if any string matches. options
XsString <optional>
Options to this query. The default is (). Options include: "case-sensitive" A case-sensitive query. "case-insensitive" A case-insensitive query. "diacritic-sensitive" A diacritic-sensitive query. "diacritic-insensitive" A diacritic-insensitive query. "punctuation-sensitive" A punctuation-sensitive query. "punctuation-insensitive" A punctuation-insensitive query. "whitespace-sensitive" A whitespace-sensitive query. "whitespace-insensitive" A whitespace-insensitive query. "stemmed" A stemmed query. "unstemmed" An unstemmed query. "wildcarded" A wildcarded query. "unwildcarded" An unwildcarded query. "exact" An exact match query. Shorthand for "case-sensitive", "diacritic-sensitive", "punctuation-sensitive", "whitespace-sensitive", "unstemmed", and "unwildcarded". "lang=iso639code" Specifies the language of the query. The iso639code code portion is case-insensitive, and uses the languages specified by ISO 639. The default is specified in the database configuration. "distance-weight=number" A weight applied based on the minimum distance between matches of this query. Higher weights add to the importance of proximity (as opposed to term matches) when the relevance order is calculated. The default value is 0.0 (no impact of proximity). The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. This parameter has no effect if the word positions index is not enabled. This parameter has no effect on searches that use score-simple, score-random, or score-zero (because those scoring algorithms do not consider term frequency, proximity is irrelevant). "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "synonym" Specifies that all of the terms in the $text parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). "lexicon-expand=value" The value is one of full, prefix-postfix, off, or heuristic (the default is heuristic). An option with a value of lexicon-expand=full specifies that wildcards are resolved by expanding the pattern to words in a lexicon (if there is one available), and turning into a series of cts:word-queries, even if this takes a long time to evaluate. An option with a value of lexicon-expand=prefix-postfix specifies that wildcards are resolved by expanding the pattern to the pre- and postfixes of the words in the word lexicon (if there is one), and turning the query into a series of character queries, even if it takes a long time to evaluate. An option with a value of lexicon-expand=off specifies that wildcards are only resolved by looking up character patterns in the search pattern index, not in the lexicon. An option with a value of lexicon-expand=heuristic, which is the default, specifies that wildcards are resolved by using a series of internal rules, such as estimating the number of lexicon entries that need to be scanned, seeing if the estimate crosses certain thresholds, and (if appropriate), using another way besides lexicon expansion to resolve the query. * "lexicon-expansion-limit=number" Specifies the limit for lexicon expansion. This puts a restriction on the number of lexicon expansions that can be performed. If the limit is exceeded, the server may raise an error depending on whether the "limit-check" option is set. The default value for this option will be 4096. "limit-check" Specifies that an error will be raised if the lexicon expansion exceeds the specified limit. "no-limit-check" Specifies that error will not be raised if the lexicon expansion exceeds the specified limit. The server will try to resolve the wildcard. weight
XsDouble <optional>
A weight for this query. Higher weights move search results up in the relevance order. The default is 1.0. The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. Weights less than the absolute value of 0.0625 (between -0.0625 and 0.0625) are rounded to 0, which means that they do not contribute to the score. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
linestring(vertices) → {CtsLinestring}
-
Returns a geospatial linestring value. Provides a client interface to a server function. See cts.linestring
Parameters:
Name Type Argument Description vertices
XsAnyAtomicType <optional>
The waypoints of the linestring, given in order. vertexes. - Since:
-
- 2.1.1
Returns:
- Type
- CtsLinestring
-
-
locksFragmentQuery(query) → {CtsQuery}
-
Returns a query that matches all documents where query matches document-locks. When searching documents or document-properties, cts:locks-fragment-query provides a convenient way to additionally constrain the search against document-locks fragments. Provides a client interface to a server function. See cts.locksFragmentQuery
Parameters:
Name Type Argument Description query
CtsQuery <optional>
A query to be matched against the locks fragment. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
lsqtQuery(temporalCollection, timestamp, options, weight) → {CtsQuery}
-
Returns only documents before LSQT or a timestamp before LSQT for stable query results. Provides a client interface to a server function. See cts.lsqtQuery
Parameters:
Name Type Argument Description temporalCollection
XsString <optional>
The name of the temporal collection. timestamp
XsDateTime <optional>
Return only temporal documents with a system start time less than or equal to this value. Default is temporal:get-lsqt($temporal-collection). Timestamps larger than LSQT are rejected. options
XsString <optional>
Options to this query. The default is (). Options include: "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "cached-incremental" Break down the query into sub-queries and then cache each one of them for better performance. This is enabled, by default. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. weight
XsDouble <optional>
A weight for this query. Higher weights move search results up in the relevance order. The default is 1.0. The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. Weights less than the absolute value of 0.0625 (between -0.0625 and 0.0625) are rounded to 0, which means that they do not contribute to the score. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
nearQuery(queries, distance, options, weight) → {CtsQuery}
-
Returns a query matching all of the specified queries, where the matches occur within the specified distance from each other. Provides a client interface to a server function. See cts.nearQuery
Parameters:
Name Type Argument Description queries
CtsQuery <optional>
A sequence of queries to match. distance
XsDouble <optional>
A distance, in number of words, between any two matching queries. The results match if two queries match and the distance between the two matches is equal to or less than the specified distance. A distance of 0 matches when the text is the exact same text or when there is overlapping text (see the third example below). A negative distance is treated as 0. The default value is 10. options
XsString <optional>
Options to this query. The default value is (). Options include: "ordered" Any near-query matches must occur in the order of the specified sub-queries. "unordered" Any near-query matches will satisfy the query, regardless of the order they were specified. "minimum-distance" The minimum distance between two matching queries. The results match if the two queries match and the minimum distance between the two matches is greater than or equal to the specified minimum distance. The default value is zero. A negative distance is treated as 0. weight
XsDouble <optional>
A weight attributed to the distance for this query. Higher weights add to the importance of distance (as opposed to term matches) when the relevance order is calculated. The default value is 1.0. The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. Weights less than the absolute value of 0.0625 (between -0.0625 and 0.0625) are rounded to 0, which means that they do not contribute to the score. This parameter has no effect if the word positions index is not enabled. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
notInQuery(positiveQuery, negativeQuery) → {CtsQuery}
-
Returns a query matching the first subquery, where those matches do not occur within 0 distance of the other query. Provides a client interface to a server function. See cts.notInQuery
Parameters:
Name Type Argument Description positiveQuery
CtsQuery <optional>
A positive query, specifying the search results filtered in. negativeQuery
CtsQuery <optional>
A negative query, specifying the search results to filter out. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
notQuery(query) → {CtsQuery}
-
Returns a query specifying the matches not specified by its sub-query. Provides a client interface to a server function. See cts.notQuery
Parameters:
Name Type Argument Description query
CtsQuery <optional>
A negative query, specifying the search results to filter out. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
orQuery(queries, options) → {CtsQuery}
-
Returns a query specifying the union of the matches specified by the sub-queries. Provides a client interface to a server function. See cts.orQuery
Parameters:
Name Type Argument Description queries
CtsQuery <optional>
A sequence of sub-queries. options
XsString <optional>
Options to this query. The default is (). Options include: "synonym" Specifies that all of the terms in the $queries parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
partOfSpeech(token) → {XsString}
-
Returns the part of speech for a cts:token, if any. Provides a client interface to a server function. See cts.partOfSpeech
Parameters:
Name Type Argument Description token
XsString <optional>
A token, as returned from cts:tokenize. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
pathGeospatialQuery(pathExpression, region, options, weight) → {CtsQuery}
-
Returns a query matching path expressions whose content represents a point contained within the given geographic box, circle, or polygon, or equal to the given point. Points that lie between the southern boundary and the northern boundary of a box, travelling northwards, and between the western boundary and the eastern boundary of the box, travelling eastwards, will match. Points contained within the given radius of the center point of a circle will match, using the curved distance on the surface of the Earth. Points contained within the given polygon will match, using great circle arcs over a spherical model of the Earth as edges. An error may result if the polygon is malformed in some way. Points equal to the a given point will match, taking into account the fact that longitudes converge at the poles. Using the geospatial query constructors requires a valid geospatial license key; without a valid license key, searches that include geospatial queries will throw an exception. Provides a client interface to a server function. See cts.pathGeospatialQuery
Parameters:
Name Type Argument Description pathExpression
XsString <optional>
One or more path expressions to match. When multiple path expressions are specified, the query matches if any path expression matches. region
CtsRegion <optional>
One or more geographic boxes, circles, polygons, or points. Where multiple regions are specified, the query matches if any region matches. options
XsString <optional>
Options to this query. The default is (). Options include: "coordinate-system=string" Use the given coordinate system. Valid values are: wgs84The WGS84 coordinate system. wgs84/doubleThe WGS84 coordinate system at double precision. etrs89The ETRS89 coordinate system. etrs89/doubleThe ETRS89 coordinate system at double precision. rawThe raw (unmapped) coordinate system. raw/doubleThe raw coordinate system at double precision. "precision=value" Use the coordinate system at the given precision. Allowed values: float and double. "units=value" Measure distance and the radii of circles in the specified units. Allowed values: miles (default), km, feet, meters. "boundaries-included" Points on boxes', circles', and polygons' boundaries are counted as matching. This is the default. "boundaries-excluded" Points on boxes', circles', and polygons' boundaries are not counted as matching. "boundaries-latitude-excluded" Points on boxes' latitude boundaries are not counted as matching. "boundaries-longitude-excluded" Points on boxes' longitude boundaries are not counted as matching. "boundaries-south-excluded" Points on the boxes' southern boundaries are not counted as matching. "boundaries-west-excluded" Points on the boxes' western boundaries are not counted as matching. "boundaries-north-excluded" Points on the boxes' northern boundaries are not counted as matching. "boundaries-east-excluded" Points on the boxes' eastern boundaries are not counted as matching. "boundaries-circle-excluded" Points on circles' boundary are not counted as matching. "boundaries-endpoints-excluded" Points on linestrings' boundary (the endpoints) are not counted as matching. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "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-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $regions parameter are considered synonyms for scoring purposes. The result is that occurances of more than one of the synonyms are scored as if there are more occurance of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
pathRangeQuery(pathName, operator, value, options, weight) → {CtsQuery}
-
Returns a cts:query matching documents where the content addressed by an XPath expression satisfies the specified relationship (=, <, >, etc.) with respect to the input criteria values. A path range index must exist for each path when you perform a search. Provides a client interface to a server function. See cts.pathRangeQuery
Parameters:
Name Type Argument Description pathName
XsString <optional>
One or more XPath expressions that identify the content to match. When multiple paths are specified, the query matches if any path matches. operator
XsString <optional>
A comparison operator. Operators include: "<" Match range index values less than $value. "<=" Match range index values less than or equal to $value. ">" Match range index values greater than $value. ">=" Match range index values greater than or equal to $value. "=" Match range index values equal to $value. "!=" Match range index values not equal to $value. value
XsAnyAtomicType <optional>
One or more values to match. These values are compared to the value(s) addressed by the path-expression parameter. When multiple When multiple values are specified, the query matches if any value matches. The value must be a type for which there is a range index defined. options
XsString <optional>
Options to this query. The default is (). Options include: "collation=URI" Use the range index with the collation specified by URI. If not specified, then the default collation from the query is used. If a range index with the specified collation does not exist, an error is thrown. "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "cached-incremental" When querying on a short date or dateTime range, break the query into sub-queries on smaller ranges, and then cache the results of each. See the Usage Notes for details. "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $value parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
pathReference(pathExpression, options, map) → {CtsReference}
-
Creates a reference to a path value lexicon, for use as a parameter to cts:value-tuples. Since lexicons are implemented with range indexes, this function will throw an exception if the specified range index does not exist. Provides a client interface to a server function. See cts.pathReference
Parameters:
Name Type Argument Description pathExpression
XsString <optional>
A path range index expression. options
XsString <optional>
Options. The default is (). Options include: "type=type" Use the lexicon with the type specified by type (int, unsignedInt, long, unsignedLong, float, double, decimal, dateTime, time, date, gYearMonth, gYear, gMonth, gDay, yearMonthDuration, dayTimeDuration, string, anyURI, point, or long-lat-point) "collation=URI" Use the lexicon with the collation specified by URI. "nullable" Allow null values in tuples reported from cts:value-tuples when using this lexicon. "unchecked" Read the scalar type, collation and coordinate-system info only from the input. Do not check the definition against the context database. "coordinate-system=name" Create a reference to an index or lexicon based on the specified coordinate system. Allowed values: "wgs84", "wgs84/double", "raw", "raw/double". Only applicable if the index/lexicon value type is point or long-lat-point. "precision=value" Create a reference to an index or lexicon configured with the specified geospatial precision. Allowed values: float and double. Only applicable if the index/lexicon value type is point or long-lat-point. This value takes precedence over the precision implicit in the coordinate system name. map
MapMap <optional>
A map of namespace bindings. The keys should be namespace prefixes and the values should be namespace URIs. These namespace bindings will be added to the in-scope namespace bindings in the interpretation of the path. - Since:
-
- 2.1.1
Returns:
- Type
- CtsReference
-
-
period(start, end) → {CtsPeriod}
-
Creates a period value, for use as a parameter to cts:period-range-query or cts:period-compare-query. Provides a client interface to a server function. See cts.period
Parameters:
Name Type Argument Description start
XsDateTime <optional>
The dateTime value indicating start of the period. end
XsDateTime <optional>
The dateTime value indicating end of the period. - Since:
-
- 2.1.1
Returns:
- Type
- CtsPeriod
-
-
periodCompareQuery(axis1, operator, axis2, options) → {CtsQuery}
-
Returns a cts:query matching documents that have relevant pair of period values. Searches with the cts:period-compare-query constructor require two valid names of period, if the either of the specified period does not exist, then an exception is thrown. Provides a client interface to a server function. See cts.periodCompareQuery
Parameters:
Name Type Argument Description axis1
XsString <optional>
Name of the first axis to compare operator
XsString <optional>
A comparison operator. Period is the two timestamps contained in the axis. Operators include: "aln_equals" Match documents whose period1 equals period2. "aln_contains" Match documents whose period1 contains period2. i.e. period1 starts before period2 starts and ends before period2 ends. "aln_contained_by" Match documents whose period1 is contained by period2. "aln_meets" Match documents whose period1 meets period2, i.e. period1 ends at period2 start. "aln_met_by" Match documents whose period1 meets period2, i.e. period1 starts at period2 end. "aln_before" Match documents whose period1 is before period2, i.e. period1 ends before period2 starts. "aln_after" Match documents whose period1 is after period2, i.e. period1 starts after period2 ends. "aln_starts" Match documents whose period1 starts period2, i.e. period1 starts at period2 start and ends before period2 ends. "aln_started_by" Match documents whose period2 starts period1, i.e. period1 starts at period2 start and ends after period2 ends. "aln_finishes" Match documents whose period1 finishes period2, i.e. period1 finishes at period2 finish and starts after period2 starts. "aln_finished_by" Match documents whose period2 finishes period1, i.e. period1 finishes at period2 finish and starts before period2 starts. "aln_overlaps" Match documents whose period1 overlaps period2, i.e. period1 starts before period2 start and ends before period2 ends but after period2 starts. "aln_overlapped_by" Match documents whose period2 overlaps period1, i.e. period1 starts after period2 start but before period2 ends and ends after period2 ends. "iso_contains" Match documents whose period1 contains period2 in sql 2011 standard. i.e. period1 starts before or at period2 starts and ends after or at period2 ends. "iso_overlaps" Match documents whose period1 overlaps period2 in sql 2011 standard. i.e. period1 and period2 have common time period. "iso_succeeds" Match documents whose period1 succeeds period2 in sql 2011 standard. i.e. period1 starts at or after period2 ends "iso_precedes" Match documents whose period1 precedes period2 in sql 2011 standard. i.e. period1 ends at or before period2 ends "iso_succeeds" Match documents whose period1 succeeds period2 in sql 2011 standard. i.e. period1 starts at or after period2 ends "iso_precedes" Match documents whose period1 precedes period2 in sql 2011 standard. i.e. period1 ends at or before period2 ends "iso_imm_succeeds" Match documents whose period1 immediately succeeds period2 in sql 2011 standard. i.e. period1 starts at period2 ends "iso_imm_precedes" Match documents whose period1 immediately precedes period2 in sql 2011 standard. i.e. period1 ends at period2 ends axis2
XsString <optional>
Name of the second period to compare options
XsString <optional>
Options to this query. The default is (). Options include: "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
periodRangeQuery(axis, operator, period, options) → {CtsQuery}
-
Returns a cts:query matching axis by name with a period value with an operator. Searches with the cts:period-range-query constructor require a axis definition on the axis name; if there is no axis configured, then an exception is thrown. Provides a client interface to a server function. See cts.periodRangeQuery
Parameters:
Name Type Argument Description axis
XsString <optional>
One or more axis to match on. operator
XsString <optional>
A comparison operator. Operators include: "aln_equals" Match documents whose period1 equals value. "aln_contains" Match documents whose period1 contains value. i.e. period1 starts before value starts and ends before value ends. "aln_contained_by" Match documents whose period1 is contained by value. "aln_meets" Match documents whose period1 meets value, i.e. period1 ends at value start. "aln_met_by" Match documents whose period1 meets value, i.e. period1 starts at value end. "aln_before" Match documents whose period1 is before value, i.e. period1 ends before value starts. "aln_after" Match documents whose period1 is after value, i.e. period1 starts after value ends. "aln_starts" Match documents whose period1 starts value, i.e. period1 starts at value start and ends before value ends. "aln_started_by" Match documents whose value starts period1, i.e. period1 starts at value start and ends after value ends. "aln_finishes" Match documents whose period1 finishes value, i.e. period1 finishes at value finish and starts after value starts. "aln_finished_by" Match documents whose value finishes period1, i.e. period1 finishes at value finish and starts before value starts. "aln_overlaps" Match documents whose period1 overlaps value, i.e. period1 starts before value start and ends before value ends but after value starts. "aln_overlapped_by" Match documents whose value overlaps period1, i.e. period1 starts after value start but before value ends and ends after value ends. "iso_contains" Match documents whose period1 contains value in sql 2011 standard. i.e. period1 starts before or at value starts and ends after or at value ends. "iso_overlaps" Match documents whose period1 overlaps value in sql 2011 standard. i.e. period1 and value have common time period. "iso_succeeds" Match documents whose period1 succeeds value in sql 2011 standard. i.e. period1 starts at or after value ends "iso_precedes" Match documents whose period1 precedes value in sql 2011 standard. i.e. period1 ends at or before value ends "iso_imm_succeeds" Match documents whose period1 immediately succeeds value in sql 2011 standard. i.e. period1 starts at value end "iso_imm_precedes" Match documents whose period1 immediately precedes value in sql 2011 standard. i.e. period1 ends at value end period
CtsPeriod <optional>
the cts:period to perform operations on. When multiple values are specified, the query matches if any value matches. options
XsString <optional>
Options to this query. The default is (). Options include: "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
point(latitude, longitude) → {CtsPoint}
-
Returns a point value. Provides a client interface to a server function. See cts.point
Parameters:
Name Type Argument Description latitude
XsDouble <optional>
The latitude of the point. longitude
XsDouble <optional>
The longitude of the point. - Since:
-
- 2.1.1
Returns:
- Type
- CtsPoint
-
-
pointLatitude(point) → {XsNumeric}
-
Returns a point's latitude value. Provides a client interface to a server function. See cts.pointLatitude
Parameters:
Name Type Argument Description point
CtsPoint <optional>
The point. - Since:
-
- 2.1.1
Returns:
- Type
- XsNumeric
-
-
pointLongitude(point) → {XsNumeric}
-
Returns a point's longitude value. Provides a client interface to a server function. See cts.pointLongitude
Parameters:
Name Type Argument Description point
CtsPoint <optional>
The point. - Since:
-
- 2.1.1
Returns:
- Type
- XsNumeric
-
-
polygon(vertices) → {CtsPolygon}
-
Returns a geospatial polygon value. Provides a client interface to a server function. See cts.polygon
Parameters:
Name Type Argument Description vertices
XsAnyAtomicType <optional>
The vertices of the polygon, given in order. No edge may cover more than 180 degrees of either latitude or longitude. The polygon as a whole may not encompass both poles. These constraints are necessary to ensure an unambiguous interpretation of the polygon. There must be at least three vertices. The first vertex should be identical to the last vertex to close the polygon. vertexes. - Since:
-
- 2.1.1
Returns:
- Type
- CtsPolygon
-
-
propertiesFragmentQuery(query) → {CtsQuery}
-
Returns a query that matches all documents where query matches document-properties. When searching documents or document-locks, this query type provides a convenient way to additionally constrain the search against document-properties fragments. Provides a client interface to a server function. See cts.propertiesFragmentQuery
Parameters:
Name Type Argument Description query
CtsQuery <optional>
A query to be matched against the properties fragment. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
rangeQuery(index, operator, value, options, weight) → {CtsQuery}
-
Returns a cts:query matching specified nodes with a range-index entry compared to a given value. Searches with the cts:range-query constructor require a range index; if there is no range index configured, then an exception is thrown. Provides a client interface to a server function. See cts.rangeQuery
Parameters:
Name Type Argument Description index
CtsReference <optional>
One or more range index references. When multiple indexes are specified, the query matches if any index matches. operator
XsString <optional>
A comparison operator. Operators include: "<" Match range index values less than $value. "<=" Match range index values less than or equal to $value. ">" Match range index values greater than $value. ">=" Match range index values greater than or equal to $value. "=" Match range index values equal to $value. "!=" Match range index values not equal to $value. value
XsAnyAtomicType <optional>
One or more values to match. When multiple values are specified, the query matches if any value matches. options
XsString <optional>
Options to this query. The default is (). Options include: "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. "synonym" Specifies that all of the terms in the $value parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
stem(text, language, partOfSpeech) → {XsString}
-
Returns the stem(s) for a word. Provides a client interface to a server function. See cts.stem
Parameters:
Name Type Argument Description text
XsString <optional>
A word or phrase to stem. language
XsString <optional>
A language to use for stemming. If not supplied, it uses the database default language. partOfSpeech
XsString <optional>
A part of speech to use for stemming. The default is the unspecified part of speech. This parameter is for testing custom stemmers. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
tokenize(text, language, field) → {XsString}
-
Tokenizes text into words, punctuation, and spaces. Returns output in the type cts:token, which has subtypes cts:word, cts:punctuation, and cts:space, all of which are subtypes of xs:string. Provides a client interface to a server function. See cts.tokenize
Parameters:
Name Type Argument Description text
XsString <optional>
A word or phrase to tokenize. language
XsString <optional>
A language to use for tokenization. If not supplied, it uses the database default language. field
XsString <optional>
A field to use for tokenization. If the field has custom tokenization rules, they will be used. If no field is supplied or the field has no custom tokenization rules, the default tokenization rules are used. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
tripleRangeQuery(subject, predicate, object, operator, options, weight) → {CtsQuery}
-
Returns a cts:query matching triples with a triple index entry equal to the given values. Searches with the cts:triple-range-query constructor require the triple index; if the triple index is not configured, then an exception is thrown. Provides a client interface to a server function. See cts.tripleRangeQuery
Parameters:
Name Type Argument Description subject
XsAnyAtomicType <optional>
The subjects to look up. When multiple values are specified, the query matches if any value matches. When the empty sequence is specified, then triples with any subject are matched. predicate
XsAnyAtomicType <optional>
The predicates to look up. When multiple values are specified, the query matches if any value matches. When the empty sequence is specified, then triples with any predicate are matched. object
XsAnyAtomicType <optional>
The objects to look up. When multiple values are specified, the query matches if any value matches. When the empty sequence is specified, then triples with any object are matched. operator
XsString <optional>
If a single string is provided it is treated as the operator for the $object values. If a sequence of three strings are provided, they give the operators for $subject, $predicate and $object in turn. The default operator is "=". Operators include: "sameTerm" Match triple index values which are the same RDF term as $value. This compares aspects of values that are ignored in XML Schema comparison semantics, like timezone and derived type of $value. "<" Match range index values less than $value. "<=" Match range index values less than or equal to $value. ">" Match range index values greater than $value. ">=" Match range index values greater than or equal to $value. "=" Match range index values equal to $value. "!=" Match range index values not equal to $value. options
XsString <optional>
Options to this query. The default is (). Options include: "cached" Cache the results of this query in the list cache. "uncached" Do not cache the results of this query in the list cache. "score-function=function" Use the selected scoring function. The score function may be: linearUse a linear function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. reciprocalUse a reciprocal function of the difference between the specified query value and the matching value in the index to calculate a score for this range query. zeroThis range query does not contribute to the score. This is the default. "slope-factor=number" Apply the given number as a scaling factor to the slope of the scoring function. The default is 1.0. weight
XsDouble <optional>
A weight for this query. The default is 1.0. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
trueQuery() → {CtsQuery}
-
Returns a query that matches all fragments. Provides a client interface to a server function. See cts.trueQuery
- Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery
-
-
uriReference() → {CtsReference}
-
Creates a reference to the URI lexicon, for use as a parameter to cts:value-tuples. This function requires the URI lexicon to be enabled, otherwise it throws an exception. Provides a client interface to a server function. See cts.uriReference
- Since:
-
- 2.1.1
Returns:
- Type
- CtsReference
-
-
wordQuery(text, options, weight) → {CtsQuery}
-
Returns a query matching text content containing a given phrase. Provides a client interface to a server function. See cts.wordQuery
Parameters:
Name Type Argument Description text
XsString <optional>
Some words or phrases to match. When multiple strings are specified, the query matches if any string matches. options
XsString <optional>
Options to this query. The default is (). Options include: "case-sensitive" A case-sensitive query. "case-insensitive" A case-insensitive query. "diacritic-sensitive" A diacritic-sensitive query. "diacritic-insensitive" A diacritic-insensitive query. "punctuation-sensitive" A punctuation-sensitive query. "punctuation-insensitive" A punctuation-insensitive query. "whitespace-sensitive" A whitespace-sensitive query. "whitespace-insensitive" A whitespace-insensitive query. "stemmed" A stemmed query. "unstemmed" An unstemmed query. "wildcarded" A wildcarded query. "unwildcarded" An unwildcarded query. "exact" An exact match query. Shorthand for "case-sensitive", "diacritic-sensitive", "punctuation-sensitive", "whitespace-sensitive", "unstemmed", and "unwildcarded". "lang=iso639code" Specifies the language of the query. The iso639code code portion is case-insensitive, and uses the languages specified by ISO 639. The default is specified in the database configuration. "distance-weight=number" A weight applied based on the minimum distance between matches of this query. Higher weights add to the importance of proximity (as opposed to term matches) when the relevance order is calculated. The default value is 0.0 (no impact of proximity). The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. This parameter has no effect if the word positions index is not enabled. This parameter has no effect on searches that use score-simple, score-random, or score-zero (because those scoring algorithms do not consider term frequency, proximity is irrelevant). "min-occurs=number" Specifies the minimum number of occurrences required. If fewer that this number of words occur, the fragment does not match. The default is 1. "max-occurs=number" Specifies the maximum number of occurrences required. If more than this number of words occur, the fragment does not match. The default is unbounded. "synonym" Specifies that all of the terms in the $text parameter are considered synonyms for scoring purposes. The result is that occurrences of more than one of the synonyms are scored as if there are more occurrences of the same term (as opposed to having a separate term that contributes to score). "lexicon-expand=value" The value is one of full, prefix-postfix, off, or heuristic (the default is heuristic). An option with a value of lexicon-expand=full specifies that wildcards are resolved by expanding the pattern to words in a lexicon (if there is one available), and turning into a series of cts:word-queries, even if this takes a long time to evaluate. An option with a value of lexicon-expand=prefix-postfix specifies that wildcards are resolved by expanding the pattern to the pre- and postfixes of the words in the word lexicon (if there is one), and turning the query into a series of character queries, even if it takes a long time to evaluate. An option with a value of lexicon-expand=off specifies that wildcards are only resolved by looking up character patterns in the search pattern index, not in the lexicon. An option with a value of lexicon-expand=heuristic, which is the default, specifies that wildcards are resolved by using a series of internal rules, such as estimating the number of lexicon entries that need to be scanned, seeing if the estimate crosses certain thresholds, and (if appropriate), using another way besides lexicon expansion to resolve the query. "lexicon-expansion-limit=number" Specifies the limit for lexicon expansion. This puts a restriction on the number of lexicon expansions that can be performed. If the limit is exceeded, the server may raise an error depending on whether the "limit-check" option is set. The default value for this option will be 4096. "limit-check" Specifies that an error will be raised if the lexicon expansion exceeds the specified limit. "no-limit-check" Specifies that error will not be raised if the lexicon expansion exceeds the specified limit. The server will try to resolve the wildcard. weight
XsDouble <optional>
A weight for this query. Higher weights move search results up in the relevance order. The default is 1.0. The weight should be between 64 and -16. Weights greater than 64 will have the same effect as a weight of 64. Weights less than the absolute value of 0.0625 (between -0.0625 and 0.0625) are rounded to 0, which means that they do not contribute to the score. - Since:
-
- 2.1.1
Returns:
- Type
- CtsQuery