Loading TOC...

MarkLogic Server 11.0 Product Documentation
FacetsSearch.withOptions

FacetsSearch.withOptions(
   option as object
) as FacetsSearch

Summary

Configure advanced options for facet generation.

Parameters
option The configuration object for enabling special features of the facets search. See the Usage Notes for details.

Usage Notes

You can specify the following properties in the configuration object:
maxThreads
The maximum number of threads to use for concurrent facet processing. Default value: 8.
qualityWeight
A number specifying the weight for the search.
forestNames
An array of strings for restricting the query to documents in the specified forests.

See Also

Example


// Use 12 threads for concurrent facet generation.
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.facets([
    jsearch.facet('Author', 'author'),
    jsearch.facet('MediaFormat', 'format')])
  .where(jsearch.byExample({price: {$lt: 15}}))
  .withOptions({maxThreads: 12})
  .result()
   

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