Reputation: 530
As per the documentation: Value lexicons are created by configuring the range indexes. Word lexicons can be created for the entire database or for specific elements or attributes.
Does this imply that range indexes are not required for creating word lexicons ? What role do range indexes play in creating a unique list of word/values ?
Upvotes: 1
Views: 179
Reputation: 7770
You do not need range indexes for word lexicons. In fact, there is quite a bit of power in using just lexicons and expanding/searching with cts:word-match() and feeding the results into a word query, for instance.
A lexicon is a unique list of all words (based on word boundaries set up in your collation and lexicon settings).
A range index is an index on the entire value of an element. And in many cases, a range index implies that you want to do range queries.
Take This Phrase: 'The chair is against the wall'
In a range index, the index has a single entry: the full phrase
In a lexicon, it has a list of words:
They are simply different features.
Do you have more concrete questions/examples of where you need more detailed examples? If so, update your question with other detail and we can elaborate.
Range indexes store the value of those elements/attributes. These values can be retrieved from the range-index's internal lexicon via cts:values() and related functions.
Upvotes: 5