Loading TOC...

FacetDefinition.thisWhere

FacetDefinition.thisWhere(
   $queries as cts.query
) as FacetDefinition

Summary

Specify a query to apply only to this facet.

Parameters
$queries One or an array of cts.query objects.

See Also

Example


// Generate facets from all values of the "author" JSON property, but only
// generate facets from the "format" JSON property from documents where
// the "format" JSON property value is "paperback".
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.facets([
    jsearch.facet('Author', 'author'),
    jsearch.facet('Media Type','format')
      .thisWhere(jsearch.byExample({format: 'paperback'}))])
  .result()
   

Comments

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