MarkLogic Server 11.0 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.

48 functions
Function name Description
cts.collectionMatch Returns values from the collection lexicon that match the specified wildcard pattern.
cts.collectionReference 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.elementAttributeReference Creates a reference to an element attribute value lexicon, for use as a parameter to cts:value-tuples.
cts.elementAttributeValueCoOccurrences Returns value co-occurrences from the specified element or element-attribute value lexicon(s).
cts.elementAttributeValueMatch Returns values from the specified element-attribute value lexicon(s) that match the specified pattern.
cts.elementAttributeValueRanges Returns value ranges from the specified element-attribute value lexicon(s).
cts.elementAttributeValues Returns values from the specified element-attribute value lexicon(s).
cts.elementAttributeWordMatch Returns words from the specified element-attribute word lexicon(s) that match a wildcard pattern.
cts.elementAttributeWords Returns words from the specified element-attribute word lexicon(s).
cts.elementReference Creates a reference to an element value lexicon, for use as a parameter to cts.valueTuples, temporal.axisCreate, or any other function that takes an index reference.
cts.elementValueCoOccurrences 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.elementValueMatch Returns values from the specified element value lexicon(s) that match the specified wildcard pattern.
cts.elementValueRanges Returns value ranges from the specified element value lexicon(s).
cts.elementValues Returns values from the specified element value lexicon(s).
cts.elementWordMatch Returns words from the specified element word lexicon(s) that match a wildcard pattern.
cts.elementWords Returns words from the specified element word lexicon.
cts.fieldReference Creates a reference to a field value lexicon, for use as a parameter to cts.valueTuples.
cts.fieldValueCoOccurrences 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.fieldValueMatch Returns values from the specified field value lexicon(s) that match the specified wildcard pattern.
cts.fieldValueRanges Returns value ranges from the specified field value lexicon(s).
cts.fieldValues Returns values from the specified field value lexicon(s).
cts.fieldWordMatch Returns words from the specified field word lexicon(s) that match a wildcard pattern.
cts.fieldWords 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.iriReference Creates a reference to the URI lexicon, for use as a parameter to cts:value-tuples.
cts.jsonPropertyReference Creates a reference to a JSON property value lexicon, for use as a parameter to cts:value-tuples.
cts.jsonPropertyWordMatch Returns words from the specified JSON property word lexicon(s) that match a wildcard pattern.
cts.jsonPropertyWords Returns words from the specified JSON property word lexicon.
cts.pathReference Creates a reference to a path value lexicon, for use as a parameter to cts:value-tuples.
cts.referenceCollation Accessor for the collation of a reference to a string value lexicon.
cts.referenceCoordinateSystem Accessor for the coordinate-system of a reference to a geospatial lexicon.
cts.referenceNamespaces Accessor for the namespaces of a reference to a [geospatial] path lexicon.
cts.referenceNullable Returns true() if the reference is nullable, false() otherwise.
cts.referenceParse Creates a reference to a value lexicon by parsing its XML or JSON representation, for use as a parameter to cts:value-tuples.
cts.referenceScalarType Accessor for the scalar type of a reference to a value lexicon.
cts.triples Returns values from the triple index.
cts.tripleValueStatistics Returns statistics from the triple index for the values given.
cts.uriMatch Returns values from the URI lexicon that match the specified wildcard pattern.
cts.uriReference 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.valueCoOccurrences Returns value co-occurrences (that is, pairs of values, both of which appear in the same fragment) from the specified value lexicon(s).
cts.valueMatch Returns values from the specified value lexicon(s) that match the specified wildcard pattern.
cts.valueRanges Returns value ranges from the specified value lexicon(s).
cts.values Returns values from the specified value lexicon(s).
cts.valueTuples Returns value co-occurrence tuples (that is, tuples of values, each of which appear in the same fragment) from the specified value lexicons.
cts.wordMatch Returns words from the word lexicon that match the wildcard pattern.
cts.words Returns words from the word lexicon.
Powered by MarkLogic Server | Terms of Use | Privacy Policy