Loading TOC...

jsearch.words

jsearch.words(
   $index as LexiconDefinition
) as WordsSearch

Summary

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

Parameters
$indexA 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

Example


// Match words in the JSON property named "title".
var jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.words(jsearch.jsonPropertyLexicon('title'))
  .match('c*')
  .result();
   

Comments

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