How to use variables in MongoDB Map-reduce map function

前端 未结 2 684
盖世英雄少女心
盖世英雄少女心 2020-12-05 18:37

Given a document

{_id:110000, groupings:{A:\'AV\',B:\'BV\',C:\'CV\',D:\'DV\'},coin:{old:10,new:12}}

My specs call for the specification of

2条回答
  •  清歌不尽
    2020-12-05 19:18

    You can pass global, read-only data into map-reduce functions using the "scope" parameter on the map-reduce command. It's not very well documented, I'm afraid.

提交回复
热议问题