Loading TOC...

cts functions

The table below lists all the cts built-in functions (in this namespace: http://marklogic.com/cts).

You can also view these functions broken down by category:

261 functions
Function name Description
cts:aggregate Executes a built-in or user-defined extension aggregate function against a value lexicon or n-way co-occurence of multiple value lexicons.
cts:and-not-query Returns a query specifying the set difference of the matches specified by two sub-queries.
cts:and-not-query-negative-query Returns the negative (second parameter) query used to construct the specified query.
cts:and-not-query-positive-query Returns the positive (first parameter) query used to construct the specified query.
cts:and-query Returns a query specifying the intersection of the matches specified by the sub-queries.
cts:and-query-options Returns the options for the specified query.
cts:and-query-queries Returns a sequence of the queries that were used to construct the specified query.
cts:arc-intersection Returns the point at the intersection of two arcs.
cts:avg [DEPRECATED: use cts:avg-aggregate] Returns a frequency-weighted average of a sequence.
cts:avg-aggregate Returns the average given a value lexicon.
cts:bearing Returns the true bearing in radians of the path from the first point to the second.
cts:bounding-boxes Returns a sequence of boxes that bound the given region.
cts:box Returns a geospatial box value.
cts:box-east Returns a box's eastern boundary.
cts:box-intersects Returns true if the box intersects with a region.
cts:box-north Returns a box's northern boundary.
cts:box-south Returns a box's southern boundary.
cts:box-west Returns a box's western boundary.
cts:circle Returns a geospatial circle value.
cts:circle-center Returns a circle's center point.
cts:circle-intersects Returns true if the circle intersects with a region.
cts:circle-radius Returns a circle's radius.
cts:classify Classifies a sequence of nodes based on training data.
cts:cluster Produces a set of clusters from a sequence of nodes.
cts:collection-match Returns values from the collection lexicon that match the specified wildcard pattern.
cts:collection-query Returns a query matching documents in the collections with the given URIs.
cts:collection-query-uris Returns the URIs used to construct the specified query.
cts:collection-reference Creates a reference to the collection lexicon, for use as a parameter to cts:value-tuples.
cts:collections Returns values from the collection lexicon.
cts:complex-polygon Returns a geospatial complex polygon value.
cts:complex-polygon-contains Returns true if the complex-polygon contains a region.
cts:complex-polygon-inner Returns a complex polygon's inner polygons.
cts:complex-polygon-intersects Returns true if the complex-polygon intersects with a region.
cts:complex-polygon-outer Returns a complex polygon's outer polygon.
cts:confidence Returns the confidence of a node, or of the context node if no node is provided.
cts:contains Returns true if any of a sequence of nodes matches a query.
cts:correlation Returns the frequency-weighted correlation given a 2-way co-occurrence.
cts:count [DEPRECATED: use cts:count-aggregate] Returns a frequency-weighted count of a sequence.
cts:count-aggregate Returns the count of a value lexicon.
cts:covariance Returns the frequency-weighted sample covariance given a 2-way co-occurrence.
cts:covariance-p Returns the frequency-weighted covariance of the population given a 2-way co-occurrence.
cts:deregister Deregister a registered query, explicitly releasing the associated resources.
cts:destination Returns the point at the given distance (in miles) along the given bearing (in radians) from the starting point.
cts:directory-query Returns a query matching documents in the directories with the given URIs.
cts:directory-query-depth Returns the depth used to construct the specified query.
cts:directory-query-uris Returns the URIs used to construct the specified query.
cts:distance Returns the distance (in miles) between two points.
cts:distinctive-terms Return the most "relevant" terms in the model nodes (that is, the terms with the highest scores).
cts:document-fragment-query Returns a query that matches all documents where $query matches any document fragment.
cts:document-fragment-query-query Returns the query used to construct the specified query.
cts:document-query Returns a query matching documents with the given URIs.
cts:document-query-uris Returns the URIs used to construct the specified query.
cts:element-attribute-pair-geospatial-boxes Returns boxes derived from the specified element point lexicon(s).
cts:element-attribute-pair-geospatial-query Returns a cts: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.
cts:element-attribute-pair-geospatial-query-element-name Returns the QNames used to construct the specified query.
cts:element-attribute-pair-geospatial-query-latitude-name Returns the QNames used to construct the specified query.
cts:element-attribute-pair-geospatial-query-longitude-name Returns the QNames used to construct the specified query.
cts:element-attribute-pair-geospatial-query-options Returns the options for the specified query.
cts:element-attribute-pair-geospatial-query-region Returns the geographical regions with which the specified query was constructed.
cts:element-attribute-pair-geospatial-query-weight Returns the weight with which the specified query was constructed.
cts:element-attribute-pair-geospatial-value-match Returns values from the specified element attribute pair geospatial value lexicon(s) that match the specified wildcard pattern.
cts:element-attribute-pair-geospatial-values Returns values from the specified element-attribute-pair geospatial value lexicon(s).
cts:element-attribute-range-query Returns a cts:query matching element-attributes by name with a range-index entry equal to a given value.
cts:element-attribute-range-query-attribute-name Returns the QNames used to construct the specified query.
cts:element-attribute-range-query-element-name Returns the QNames used to construct the specified query.
cts:element-attribute-range-query-operator Returns the operator used to construct the specified query.
cts:element-attribute-range-query-options Returns the options for the specified query.
cts:element-attribute-range-query-value Returns the value used to construct the specified query.
cts:element-attribute-range-query-weight Returns the weight with which the specified query was constructed.
cts:element-attribute-reference Creates a reference to an element attribute value lexicon, for use as a parameter to cts:value-tuples.
cts:element-attribute-value-co-occurrences Returns value co-occurrences from the specified element or element-attribute value lexicon(s).
cts:element-attribute-value-geospatial-co-occurrences Returns value co-occurrences from the specified element-attribute value lexicon with the specified geospatial lexicon.
cts:element-attribute-value-match Returns values from the specified element-attribute value lexicon(s) that match the specified pattern.
cts:element-attribute-value-query Returns a query matching elements by name with attributes by name with text content equal a given phrase.
cts:element-attribute-value-query-attribute-name Returns the attribute QNames used to construct the specified query.
cts:element-attribute-value-query-element-name Returns the element QNames used to construct the specified query.
cts:element-attribute-value-query-options Returns the options for the specified query.
cts:element-attribute-value-query-text Returns the text used to construct the specified query.
cts:element-attribute-value-query-weight Returns the weight with which the specified query was constructed.
cts:element-attribute-value-ranges Returns value ranges from the specified element-attribute value lexicon(s).
cts:element-attribute-values Returns values from the specified element-attribute value lexicon(s).
cts:element-attribute-word-match Returns words from the specified element-attribute word lexicon(s) that match a wildcard pattern.
cts:element-attribute-word-query Returns a query matching elements by name with attributes by name with text content containing a given phrase.
cts:element-attribute-word-query-attribute-name Returns the attribute QNames used to construct the specified query.
cts:element-attribute-word-query-element-name Returns the element QNames used to construct the specified query.
cts:element-attribute-word-query-options Returns the options for the specified query.
cts:element-attribute-word-query-text Returns the text used to construct the specified query.
cts:element-attribute-word-query-weight Returns the weight with which the specified query was constructed.
cts:element-attribute-words Returns words from the specified element-attribute word lexicon(s).
cts:element-child-geospatial-boxes Returns boxes derived from the specified element point lexicon(s).
cts:element-child-geospatial-query Returns a cts: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.
cts:element-child-geospatial-query-child-name Returns the QNames used to construct the specified query.
cts:element-child-geospatial-query-element-name Returns the QNames used to construct the specified query.
cts:element-child-geospatial-query-options Returns the options for the specified query.
cts:element-child-geospatial-query-region Returns the geographical regions with which the specified query was constructed.
cts:element-child-geospatial-query-weight Returns the weight with which the specified query was constructed.
cts:element-child-geospatial-value-match Returns values from the specified element child geospatial value lexicon(s) that match the specified wildcard pattern.
cts:element-child-geospatial-values Returns values from the specified element-child geospatial value lexicon(s).
cts:element-geospatial-boxes Returns boxes derived from the specified element point lexicon(s).
cts:element-geospatial-query Returns a cts: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.
cts:element-geospatial-query-element-name Returns the QNames used to construct the specified query.
cts:element-geospatial-query-options Returns the options for the specified query.
cts:element-geospatial-query-region Returns the geographical regions with which the specified query was constructed.
cts:element-geospatial-query-weight Returns the weight with which the specified query was constructed.
cts:element-geospatial-value-match Returns values from the specified element geospatial value lexicon(s) that match the specified wildcard pattern.
cts:element-geospatial-values Returns values from the specified element geospatial value lexicon(s).
cts:element-pair-geospatial-boxes Returns boxes derived from the specified element point lexicon(s).
cts:element-pair-geospatial-query Returns a cts: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.
cts:element-pair-geospatial-query-element-name Returns the QNames used to construct the specified query.
cts:element-pair-geospatial-query-latitude-name Returns the QNames used to construct the specified query.
cts:element-pair-geospatial-query-longitude-name Returns the QNames used to construct the specified query.
cts:element-pair-geospatial-query-options Returns the options for the specified query.
cts:element-pair-geospatial-query-region Returns the geographical regions with which the specified query was constructed.
cts:element-pair-geospatial-query-weight Returns the weight with which the specified query was constructed.
cts:element-pair-geospatial-value-match Returns values from the specified element pair geospatial value lexicon(s) that match the specified wildcard pattern.
cts:element-pair-geospatial-values Returns values from the specified element-pair geospatial value lexicon(s).
cts:element-query Returns a cts:query matching elements by name with the content constrained by the given cts:query in the second parameter.
cts:element-query-element-name Returns the QNames used to construct the specified query.
cts:element-query-query Returns the query used to construct the element query.
cts:element-range-query Returns a cts:query matching elements by name with a range-index entry equal to a given value.
cts:element-range-query-element-name Returns the QNames used to construct the specified query.
cts:element-range-query-operator Returns the operator used to construct the specified query.
cts:element-range-query-options Returns the options for the specified query.
cts:element-range-query-value Returns the value used to construct the specified query.
cts:element-range-query-weight Returns the weight with which the specified query was constructed.
cts:element-reference Creates a reference to an element value lexicon, for use as a parameter to cts:value-tuples.
cts:element-value-co-occurrences Returns value co-occurrences (that is, pairs of values, both of which appear in the same fragment) from the specified element value lexicon(s).
cts:element-value-geospatial-co-occurrences Returns value co-occurrences from the specified element value lexicon with the specified geospatial lexicon.
cts:element-value-match Returns values from the specified element value lexicon(s) that match the specified wildcard pattern.
cts:element-value-query Returns a query matching elements by name with text content equal a given phrase.
cts:element-value-query-element-name Returns the QNames used to construct the specified query.
cts:element-value-query-options Returns the options for the specified query.
cts:element-value-query-text Returns the text used to construct the specified query.
cts:element-value-query-weight Returns the weight with which the specified query was constructed.
cts:element-value-ranges Returns value ranges from the specified element value lexicon(s).
cts:element-values Returns values from the specified element value lexicon(s).
cts:element-walk Returns a copy of the node, replacing any elements found with the specified expression.
cts:element-word-match Returns words from the specified element word lexicon(s) that match a wildcard pattern.
cts:element-word-query Returns a query matching elements by name with text content containing a given phrase.
cts:element-word-query-element-name Returns the QNames used to construct the specified query.
cts:element-word-query-options Returns the options for the specified query.
cts:element-word-query-text Returns the text used to construct the specified query.
cts:element-word-query-weight Returns the weight with which the specified query was constructed.
cts:element-words Returns words from the specified element word lexicon.
cts:entity-highlight Returns a copy of the node, replacing any entities found with the specified expression.
cts:field-range-query Returns a cts:query matching fields by name with a range-index entry equal to a given value.
cts:field-range-query-field-name Returns the fieldname used to construct the specified query.
cts:field-range-query-operator Returns the operator used to construct the specified query.
cts:field-range-query-options Returns the options for the specified query.
cts:field-range-query-value Returns the value used to construct the specified query.
cts:field-range-query-weight Returns the weight with which the specified query was constructed.
cts:field-reference Creates a reference to a field value lexicon, for use as a parameter to cts:value-tuples.
cts:field-value-co-occurrences Returns value co-occurrences (that is, pairs of values, both of which appear in the same fragment) from the specified field value lexicon(s).
cts:field-value-match Returns values from the specified field value lexicon(s) that match the specified wildcard pattern.
cts:field-value-query Returns a query matching text content containing a given value in the specified field.
cts:field-value-query-field-name Returns the names used to construct the specified cts:field-value-query.
cts:field-value-query-options Returns the options for the specified cts:field-value-query.
cts:field-value-query-text Returns the text used to construct the specified cts:field-value-query.
cts:field-value-query-weight Returns the weight with which the specified query was constructed.
cts:field-value-ranges Returns value ranges from the specified field value lexicon(s).
cts:field-values Returns values from the specified field value lexicon(s).
cts:field-word-match Returns words from the specified field word lexicon(s) that match a wildcard pattern.
cts:field-word-query Returns a query matching text content containing a given phrase in the specified field.
cts:field-word-query-field-name Returns the names used to construct the specified cts:field-word-query.
cts:field-word-query-options Returns the options for the specified cts:field-word-query.
cts:field-word-query-text Returns the text used to construct the specified cts:field-word-query.
cts:field-word-query-weight Returns the weight with which the specified query was constructed.
cts:field-words Returns words from the specified field word lexicon.
cts:fitness Returns the fitness of a node, or of the context node if no node is provided.
cts:frequency Returns an integer representing the number of times in which a particular value occurs in a value lexicon lookup (for example, cts:element-values).
cts:geospatial-attribute-pair-reference Creates a reference to a geospatial attribute pair range index, for use as a parameter to cts:value-tuples.
cts:geospatial-co-occurrences Returns value co-occurrences from the geospatial lexicons.
cts:geospatial-element-child-reference Creates a reference to a geospatial element child range index, for use as a parameter to cts:value-tuples.
cts:geospatial-element-pair-reference Creates a reference to a geospatial element pair range index, for use as a parameter to cts:value-tuples.
cts:geospatial-element-reference Creates a reference to a geospatial element range index, for use as a parameter to cts:value-tuples.
cts:highlight Returns a copy of the node, replacing any text matching the query with the specified expression.
cts:linear-model Returns a linear model that fits the frequency-weighted data set.
cts:linestring Returns a geospatial linestring value.
cts:linestring-vertices Returns a linestring's vertices.
cts:locks-query Returns a query that matches all documents where $query matches document-locks.
cts:locks-query-query Returns the query used to construct the specified query.
cts:max Returns the maximal value given a value lexicon.
cts:median Returns a frequency-weighted median of a sequence.
cts:min Returns the minimal value given a value lexicon.
cts:near-query Returns a query matching all of the specified queries, where the matches occur within the specified distance from each other.
cts:near-query-distance Returns the distance used to construct the near query.
cts:near-query-options Returns the options for the specified query.
cts:near-query-queries Returns the query sequence used to construct the near query.
cts:near-query-weight Returns the weight with which the specified query was constructed.
cts:not-in-query Returns a query matching the first subquery, where those matches do not occur within 0 distance of the other query.
cts:not-in-query-negative-query Returns the negative (second parameter) query used to construct the specified query.
cts:not-in-query-positive-query Returns the positive (first parameter) query used to construct the specified query.
cts:not-query Returns a query specifying the matches not specified by its sub-query.
cts:not-query-query Returns the query used to construct the specified query.
cts:not-query-weight Returns the weight with which the specified query was constructed.
cts:or-query Returns a query specifying the union of the matches specified by the sub-queries.
cts:or-query-queries Returns a sequence of the queries that were used to construct the specified query.
cts:parse-wkt Returns a sequence of geospatial regions parsed from Well-Known Text format.
cts:path-range-query Returns a cts:query matching paths with a range-index entry equal a given value.
cts:path-range-query-operator Returns the operator used to construct the specified query.
cts:path-range-query-options Returns the options for the specified query.
cts:path-range-query-path-name Returns the path expression used to construct the specified query.
cts:path-range-query-value Returns the value used to construct the specified query.
cts:path-range-query-weight Returns the weight with which the specified query was constructed.
cts:path-reference Creates a reference to a path value lexicon, for use as a parameter to cts:value-tuples.
cts:percent-rank Returns the rank of a value in a data set as a percentage of the data set.
cts:percentile Returns a sequence of percentile(s) given a sequence of percentage(s).
cts:point Returns a point value.
cts:point-latitude Returns a point's latitude value.
cts:point-longitude Returns a point's longitude value.
cts:polygon Returns a geospatial polygon value.
cts:polygon-contains Returns true if the polygon contains a region.
cts:polygon-intersects Returns true if the polygon intersects with a region.
cts:polygon-vertices Returns a polygon's vertices.
cts:properties-query Returns a query that matches all documents where $query matches document-properties.
cts:properties-query-query Returns the query used to construct the specified query.
cts:quality Returns the quality of a node, or of the context node if no node is provided.
cts:query Creates a query.
cts:rank Returns the rank of a value in a data set.
cts:register Register a query for later use.
cts:registered-query Returns a query matching fragments specified by previously registered queries (see cts:register).
cts:registered-query-ids Returns the registered query identifiers used to construct the specified query.
cts:registered-query-options Returns the options for the specified query.
cts:registered-query-weight Returns the weight with which the specified query was constructed.
cts:remainder Returns an estimated search result size for a node, or of the context node if no node is provided.
cts:reverse-query Returns a query matching the model nodes.
cts:reverse-query-nodes Returns the nodes used to construct the specified query.
cts:reverse-query-weight Returns the weight with which the specified query was constructed.
cts:score Returns the score of a node, or of the context node if no node is provided.
cts:search Returns a relevance-ordered sequence of nodes specified by a given query.
cts:shortest-distance Returns the great circle distance (in miles) between a point and an region.
cts:similar-query Returns a query matching nodes similar to the model nodes.
cts:similar-query-nodes Returns the nodes used to construct the specified query.
cts:similar-query-weight Returns the weight with which the specified query was constructed.
cts:stddev Returns a frequency-weighted sample standard deviation given a value lexicon.
cts:stddev-p Returns a frequency-weighted standard deviation of the population given a value lexicon.
cts:stem Returns the stem(s) for a word.
cts:sum [DEPRECATED: use cts:sum-aggregate] Returns a frequency-weighted sum of a sequence.
cts:sum-aggregate Returns the summary given a value lexicon.
cts:thresholds Compute precision, recall, the F measure, and thresholds for the classes computed by the classifier, by comparing with the labels for the same set.
cts:to-wkt Returns a sequence of strings in Well-Known Text format.
cts:tokenize Tokenizes text into words, punctuation, and spaces.
cts:train Produces a set of classifiers from a list of labeled training documents.
cts:uri-match Returns values from the URI lexicon that match the specified wildcard pattern.
cts:uri-reference Creates a reference to the URI lexicon, for use as a parameter to cts:value-tuples.
cts:uris Returns values from the URI lexicon.
cts:valid-index-path Parses path expressions and resolves namespaces based on the server run-time environment.
cts:value-co-occurrences Returns value co-occurrences (that is, pairs of values, both of which appear in the same fragment) from the specified path value lexicon(s).
cts:value-match Returns values from the specified path value lexicon(s) that match the specified wildcard pattern.
cts:value-ranges Returns value ranges from the specified path value lexicon(s).
cts:value-tuples Returns value co-occurrence tuples (that is, tuples of values, each of which appear in the same fragment) from the specified value lexicons.
cts:values Returns values from the specified value lexicon(s).
cts:variance Returns a frequency-weighted sample variance given a value lexicon.
cts:variance-p Returns a frequency-weighted variance of the population given a value lexicon.
cts:walk Walks a node, evaluating an expression with any text matching a query.
cts:word-match Returns words from the word lexicon that match the wildcard pattern.
cts:word-query Returns a query matching text content containing a given phrase.
cts:word-query-options Returns the options for the specified query.
cts:word-query-text Returns the text used to construct the specified query.
cts:word-query-weight Returns the weight with which the specified query was constructed.
cts:words Returns words from the word lexicon.