Loading TOC...

MarkLogic 9 Product Documentation
cts functions (Lexicon)

MarkLogic Server allows you to create lexicons, which are lists of unique words or values, either throughout an entire database (words only) or within named elements or attributes (words or values). Also, you can define lexicons that allow quick access to the document and collection URIs in the database, and you can create word lexicons on named fields.

A word lexicon stores all of the unique, case-sensitive, diacritic-sensitive words, either in a database, in an element defined by a QName, or in an attribute defined by a QName. A value lexicon stores all of the unique values for an element or an attribute defined by a QName (that is, the entire and exact contents of the specified element or attribute). Value lexicons use range indexes, which store all of the pairs of values that appear in the same fragment. A geospatial lexicon returns geospatial values from the geospatial index. You can also use the value lexicon functions to calculate buckets of values that occur within a specified range of values. A URI lexicon stores the URIs of the documents in a database, and a collection lexicon stores the URIs of all collections in a database.

This section describes the lexicon APIs.

46 functions
Function name Description
cts:collection-match Returns values from the collection lexicon that match the specified wildcard pattern.
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: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-match Returns values from the specified element-attribute value lexicon(s) that match the specified pattern.
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-words Returns words from the specified element-attribute word lexicon(s).
cts:element-reference 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.
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-match Returns values from the specified element value lexicon(s) that match the specified wildcard pattern.
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-word-match Returns words from the specified element word lexicon(s) that match a wildcard pattern.
cts:element-words Returns words from the specified element word lexicon.
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-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-words Returns words from the specified field word lexicon.
cts:frequency Returns an integer representing the number of times in which a particular value occurs in a value lexicon lookup.
cts:json-property-reference Creates a reference to a JSON property value lexicon, for use as a parameter to cts:value-tuples.
cts:json-property-word-match Returns words from the specified JSON property word lexicon(s) that match a wildcard pattern.
cts:json-property-words Returns words from the specified JSON property word lexicon.
cts:path-reference Creates a reference to a path value lexicon, for use as a parameter to cts:value-tuples.
cts:reference-collation Accessor for the collation of a reference to a string value lexicon.
cts:reference-coordinate-system Accessor for the coordinate-system of a reference to a geospatial lexicon.
cts:reference-nullable Returns true() if the reference is nullable, false() otherwise.
cts:reference-parse Creates a reference to a value lexicon by parsing its XML or JSON representation, for use as a parameter to cts:value-tuples.
cts:reference-scalar-type Accessor for the scalar type of a reference to a value lexicon.
cts:triple-value-statistics Returns statistics from the triple index for the values given.
cts:triples Returns values from the triple index.
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:value-co-occurrences Returns value co-occurrences (that is, pairs of values, both of which appear in the same fragment) from the specified value lexicon(s).
cts:value-match Returns values from the specified value lexicon(s) that match the specified wildcard pattern.
cts:value-ranges Returns value ranges from the specified 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:word-match Returns words from the word lexicon that match the wildcard pattern.
cts:words Returns words from the word lexicon.