博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
mongodb mapreduce 参数的详细说明
阅读量:4201 次
发布时间:2019-05-26

本文共 1535 字,大约阅读时间需要 5 分钟。

https://docs.mongodb.org/manual/reference/method/db.collection.mapReduce/#mapreduce-out-mtd

下面是对mapreduce  output的说明

Output to a Collection with an Action

This option is only available when passing a collection that already exists to out. It is not available on secondary members of replica sets.

out: {
:
[, db:
] [, sharded:
] [, nonAtomic:
] }

When you output to a collection with an action, the out has the following parameters:

  • <action>: Specify one of the following actions:

    • replace

      Replace the contents of the <collectionName> if the collection with the<collectionName> exists.

    • merge

      Merge the new result with the existing result if the output collection already exists. If an existing document has the same key as the new result, overwrite that existing document.

    • reduce

      Merge the new result with the existing result if the output collection already exists. If an existing document has the same key as the new result, apply the reduce function to both the new and the existing documents and overwrite the existing document with the result.

  • db:

    Optional. The name of the database that you want the map-reduce operation to write its output. By default this will be the same database as the input collection.

  • sharded:

    Optional. If true and you have enabled sharding on output database, the map-reduce operation will shard the output collection using the _id field as the shard key.

  • nonAtomic:

转载地址:http://uodli.baihongyu.com/

你可能感兴趣的文章
【一天一道LeetCode】#30. Substring with Concatenation of All Words
查看>>
【一天一道LeetCode】#60. Permutation Sequence.
查看>>
【一天一道LeetCode】#62. Unique Paths
查看>>
【一天一道LeetCode】#61. Rotate List
查看>>
【一天一道LeetCode】#63. Unique Paths II
查看>>
【一天一道LeetCode】#36. Valid Sudoku
查看>>
【一天一道LeetCode】#75. Sort Colors
查看>>
【一天一道LeetCode】#76. Minimum Window Substring
查看>>
【计算机网络 第五版】阅读笔记之一:概述
查看>>
【计算机网络 第五版】阅读笔记之二:物理层
查看>>
【计算机网络 第五版】阅读笔记之三:数据链路层
查看>>
【计算机网络 第五版】阅读笔记之四:网络层
查看>>
【计算机网络 第五版】阅读笔记之五:运输层
查看>>
【一天一道LeetCode】#77. Combinations
查看>>
【一天一道LeetCode】#78. Subsets
查看>>
【一天一道LeetCode】#79. Word Search
查看>>
【一天一道LeetCode】#81. Search in Rotated Sorted Array II
查看>>
【数据结构与算法】深入浅出递归和迭代的通用转换思想
查看>>
【一天一道LeetCode】#83. Remove Duplicates from Sorted List
查看>>
【一天一道LeetCode】#91. Decode Ways
查看>>