Loading TOC...

WordsSearch.match

WordsSearch.match(
   $pattern as xs.anyAtomicType
) as WordsSearch

Summary

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.

See Also

Example


// 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 iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments