Loading TOC...

MarkLogic Server 11.0 Product Documentation
WordsSearch.withOptions

WordsSearch.withOptions(
   option as object
) as WordsSearch

Summary

Configure advanced options for a words query.

Parameters
option The configuration object for enabling special features of the words search.

Usage Notes

You can specify the following properties in the configuration object:
words
An array of string options to pass through to cts.words, cts.wordMatch, or one of the other word lexicon functions for fine-tuning the configuration from the other words search clauses.
qualityWeight
A number specifying the weight for the search.
forestNames
An array of strings for restricting the query to the words in documents in the specified forests.

See Also

Example


const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.words('title')
  .withOptions({qualityWeight: 2.0})
  .result();
   

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