Loading TOC...


   $index as LexiconDefinition
) as WordsSearch


Creates a WordsSearch object to define and execute a search for a list of indexed words.

$index A JSON property (as a string) or a LexiconDefinition produced by one of the jsearch lexion helper functions; see the Usage Notes for details. You can specify a single property name, a single LexiconDefinition, or an array of LexiconDefinition's.

Usage Notes

You can search over one or more lexicons defined on JSON properties, XML elements, XML attributes, database fields, or database word lexicons. You can use a simple string to identify a JSON property, or build a LexiconDefinition using the following helper functions: jsearch.databaseLexicon, jsearch.elementLexicon, jsearch.elementAttributeLexicon, jsearch.fieldLexicon, jsearch.jsonPropertyLexicon.

See Also


// Match words in the JSON property named "title".
const jsearch = require('/MarkLogic/jsearch.sjs');

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.


The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.