Loading TOC...

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
$elementNamesThe 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.
$attributeNamesThe 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
var 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();
   

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy