jsearch.elementAttributeLexicon( elementNames as xs.QName, attributeNames as xs.QName ) as LexiconDefinition
Identifies the word lexicon for an attribute of an element
as input for the jsearch.words
method. The word lexicon
must be enabled for the attribute.
// Match words occuring in @attr1 of elem1 and @attr2 of elem2 const jsearch = require('/MarkLogic/jsearch.sjs'); jsearch.words( jsearch.elementAttributeLexicon( [fn.QName('http://my/namespace/uri','elem1'), fn.QName('http://my/namespace/uri','elem2')], ['attr1', 'attr2'])) .result();
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.