MarkLogic Server 11.0 Product Documentation
jsearch.elementLexicon

jsearch.elementLexicon(
   names as xs.QName
) as LexiconDefinition

Summary

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.

See Also

Example


// 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();
   

Example


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