Loading TOC...

TuplesSearch.result

TuplesSearch.result(
   $type as string
) as object

Summary

Executes the tuples search definition and returns results.

Parameters
$type Specifies 'value' (the default) to return the tuples as a value (an array unless reducing) or 'iterator' to return a streaming iterator over the tuples.

Usage Notes

This function can return an array or an object, depending on how the results are generated (the default results, by a mapper, or by a reducer).

See Also

Example


var jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.tuples([
    cts.jsonPropertyReference('city'), 
    cts.jsonPropertyReference('event')])
  .where(cts.wordQuery('hazard'))
  .orderBy('frequency', 'descending')
  .slice(0, 100)
  .map({frequency: 'fragment'})
  .result();
   

Comments

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