I'm writing a REST API extension where I need to know the mapping of lexicon values to documents.
Given a lexicon (and backing range index), how can I get a map of of document URIs to lexicon (index) values?
In XQuery, for values of an element, use
cts:value-tuples(cts-uri-reference(), cts:element-reference("foo"))
For values of a field, use:
cts:value-tuples(cts-uri-reference(), cts:field-reference("foo"))
See also
cts:collection-reference,
cts:element-attribute-reference,
cts:path-reference,
cts:geospatial-attribute-pair-reference
cts:geospatial-element-child-reference
cts:geospatial-element-pair-reference
cts:geospatial-element-reference
cts:geospatial-path-reference
You can get a map on co (or n-way) occurence tuples as well, by providing more arguments to cts:value-tuples().