Understanding Word Lexicons
- Last Updated: April 15, 2026
- 1 minute read
- MarkLogic Server
- Version 12.0
- Documentation
MarkLogic Server allows you to create a word lexicon that is restricted to a particular XML element, XML attribute, JSON property, or field. You can also define a field word lexicon across a collation. A word lexicon stores all of the unique words that are stored in the specified element, attribute, or JSON property. The words are stored case-sensitive and diacritic sensitive, so the words Ford and ford would be separate entries in the lexicon.
Word lexicons are used in wildcard searches (when wildcarding is enabled). For details, see Understanding and Using Wildcard Searches in the Search Developer’s Guide.
To use a word lexicon, use the following search APIs:
-
cts:element-attribute-words -
cts:element-attribute-word-match -
cts:element-words -
cts:element-word-match -
cts:field-words -
cts:field-word-match -
cts:json-property-words -
cts:json-property-word-match