MarkLogic 12 EA 1 Product Documentation
FacetsSearch.resultFacetsSearch.result(
type as string
) as Iterable
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
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();
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.