Loading TOC...

FacetsSearch.result

FacetsSearch.result(
   $type as string
) as object

Summary

Executes the facets search definition and returns the results.

Parameters
$type Specifies 'value' (the default) to return the results for each facet (and documents, if specified) as a value (an array unless reducing) or 'iterator' to return a streaming iterator over each set of results.

See Also

Example


var jsearch = require('/MarkLogic/jsearch.sjs');
var out = jsearch
  .facets(
    jsearch.facet( cts.jsonPropertyReference('city')  ).slice(0, 10),
    jsearch.facet( cts.jsonPropertyReference('event') ).slice(0, 15),
    jsearch.documents().slice(0, 25)
    )
  .where(cts.wordQuery('hazard'))
  .result();
   

Comments

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