Loading TOC...


   plugin as xs.string,
   aggregate as xs.string,
   argument as 
) as LexiconDefinition


Identifies a UDF (User Defined Function) to the ValuesSearch.aggregate function for aggregating values from a single index or to the TuplesSearch.aggregate function for aggregating co-occurring values from multiple indexes. The native plugin implementing the UDF must be installed on all hosts.

plugin The name of the plugin providing the UDF. Required.
aggregate The name of the plugin function implementing the UDF. Required.
argument An optional additional argument passed with the values on the calls to the UDF.

See Also


// Compute an aggregate using a UDF name "count", installed in
// in the modules database under native/sampleplugin
const jsearch = require('/MarkLogic/jsearch.sjs');
  .aggregate(jsearch.udf('native/sampleplugin', 'count'))

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.