MarkLogic Server 11.0 Product Documentation
jsearch.elementAttributeLexicon

jsearch.elementAttributeLexicon(
   elementNames as xs.QName,
   attributeNames as xs.QName
) as LexiconDefinition

Summary

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.

Parameters
elementNames 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 the attribute lexicons for multiple elements.
attributeNames The attribute name. Can be a string for an attribute with no namespace. Can be multiple QNames or strings (but not both) for the union of multiple attribute lexicons for the element or elements.

See Also

Example


// 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();
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy