
WordsSearch.match( pattern as xs.anyAtomicType ) as WordsSearch
Limits the words returned by a word lexicon query to those that match a wildcard pattern.
| Parameters | |
|---|---|
| pattern |
A string with a wildcard pattern (not a regex)
for matching the words in the lexicon from the documents
selected by the where clause.
|
// Find all words in the word lexicon for the JSON property "title"
// that being with "e".
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.words('title')
.match('e*')
.result()
// Result: ["East", "Eden"]
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.