
jsearch.elementLexicon( names as xs.QName ) as LexiconDefinition
Identifies the word lexicon for an element
as input for the jsearch.words method. The word lexicon
must be enabled for the element.
| Parameters | |
|---|---|
| names | The element name. Can be a string for an element with no namespace. Can be multiple QNames or strings (but not both) for the union of multiple element lexicons. |
// Match words in an element word lexicon
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.words(
jsearch.elementLexicon(
fn.QName('http://my/namespace/uri','title')))
.result();
// Match words in multiple element word lexicon
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.words(
jsearch.elementLexicon([
fn.QName('http://my/namespace/uri','title'),
fn.Qname('', 'synopsis')]))
.result();
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.