Loading TOC...

MarkLogic 10 Product Documentation
TuplesSearch.withOptions

TuplesSearch.withOptions(
   option as object
) as TuplesSearch

Summary

Configure advanced options for a tuples query.

Parameters
option A configuration object for enabling special features of the tuples query. See the Usage Notes for details.

Usage Notes

You can specify the following properties in the configuration object:
tuples
An array of string options to pass through to cts.valueTuples for fine-tuning the configuration from the other tuples search clauses.
qualityWeight
A number specifying the weight for the search.
forestNames
an array of strings for restricting the query to tuples of documents in the specified forests.

See Also

Example


const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.tuples([
    cts.jsonPropertyReference('format'), 
    cts.jsonPropertyReference('price')])
  .withOptions({tuples: ['proximity=5']})
  .result()
   

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