FacetsSearch.result( type as string ) as object
Executes the facets search definition and returns the results.
const jsearch = require('/MarkLogic/jsearch.sjs'); 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();
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.