mongo 2.1.2 → 2.2.0.rc0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/README.md +10 -3
  5. data/Rakefile +1 -7
  6. data/lib/csasl/csasl.bundle +0 -0
  7. data/lib/mongo/auth/user/view.rb +1 -1
  8. data/lib/mongo/bulk_write.rb +7 -1
  9. data/lib/mongo/client.rb +17 -15
  10. data/lib/mongo/cluster.rb +4 -2
  11. data/lib/mongo/collection.rb +36 -2
  12. data/lib/mongo/collection/view.rb +24 -21
  13. data/lib/mongo/collection/view/aggregation.rb +5 -42
  14. data/lib/mongo/collection/view/builder.rb +20 -0
  15. data/lib/mongo/collection/view/builder/aggregation.rb +98 -0
  16. data/lib/mongo/collection/view/builder/find_command.rb +111 -0
  17. data/lib/mongo/collection/view/builder/flags.rb +62 -0
  18. data/lib/mongo/collection/view/builder/map_reduce.rb +134 -0
  19. data/lib/mongo/collection/view/builder/modifiers.rb +80 -0
  20. data/lib/mongo/collection/view/builder/op_query.rb +83 -0
  21. data/lib/mongo/collection/view/explainable.rb +15 -0
  22. data/lib/mongo/collection/view/immutable.rb +5 -12
  23. data/lib/mongo/collection/view/iterable.rb +24 -2
  24. data/lib/mongo/collection/view/map_reduce.rb +18 -27
  25. data/lib/mongo/collection/view/readable.rb +70 -112
  26. data/lib/mongo/collection/view/writable.rb +23 -7
  27. data/lib/mongo/cursor.rb +76 -25
  28. data/lib/mongo/cursor/builder.rb +18 -0
  29. data/lib/mongo/cursor/builder/get_more_command.rb +71 -0
  30. data/lib/mongo/cursor/builder/kill_cursors_command.rb +62 -0
  31. data/lib/mongo/cursor/builder/op_get_more.rb +61 -0
  32. data/lib/mongo/cursor/builder/op_kill_cursors.rb +56 -0
  33. data/lib/mongo/database.rb +2 -2
  34. data/lib/mongo/database/view.rb +9 -5
  35. data/lib/mongo/dbref.rb +3 -3
  36. data/lib/mongo/error.rb +1 -0
  37. data/lib/mongo/error/invalid_write_concern.rb +35 -0
  38. data/lib/mongo/grid/file/chunk.rb +2 -2
  39. data/lib/mongo/index/view.rb +5 -2
  40. data/lib/mongo/operation.rb +1 -0
  41. data/lib/mongo/operation/commands.rb +2 -0
  42. data/lib/mongo/operation/commands/aggregate.rb +39 -45
  43. data/lib/mongo/operation/commands/aggregate/result.rb +54 -68
  44. data/lib/mongo/operation/commands/collections_info.rb +38 -36
  45. data/lib/mongo/operation/commands/collections_info/result.rb +17 -15
  46. data/lib/mongo/operation/commands/command.rb +24 -22
  47. data/lib/mongo/operation/commands/find.rb +27 -0
  48. data/lib/mongo/operation/commands/find/result.rb +62 -0
  49. data/lib/mongo/operation/commands/get_more.rb +27 -0
  50. data/lib/mongo/operation/commands/get_more/result.rb +62 -0
  51. data/lib/mongo/operation/commands/indexes.rb +41 -39
  52. data/lib/mongo/operation/commands/list_collections.rb +25 -31
  53. data/lib/mongo/operation/commands/list_collections/result.rb +63 -81
  54. data/lib/mongo/operation/commands/list_indexes.rb +27 -35
  55. data/lib/mongo/operation/commands/list_indexes/result.rb +67 -85
  56. data/lib/mongo/operation/commands/map_reduce.rb +29 -37
  57. data/lib/mongo/operation/commands/map_reduce/result.rb +85 -88
  58. data/lib/mongo/operation/commands/parallel_scan.rb +29 -33
  59. data/lib/mongo/operation/commands/parallel_scan/result.rb +34 -42
  60. data/lib/mongo/operation/commands/user_query.rb +40 -38
  61. data/lib/mongo/operation/commands/users_info.rb +24 -29
  62. data/lib/mongo/operation/commands/users_info/result.rb +13 -11
  63. data/lib/mongo/operation/object_id_generator.rb +36 -0
  64. data/lib/mongo/operation/result.rb +30 -0
  65. data/lib/mongo/operation/specifiable.rb +35 -1
  66. data/lib/mongo/operation/write/bulk/bulkable.rb +4 -3
  67. data/lib/mongo/operation/write/bulk/delete/result.rb +18 -25
  68. data/lib/mongo/operation/write/bulk/legacy_mergable.rb +2 -2
  69. data/lib/mongo/operation/write/command/delete.rb +3 -2
  70. data/lib/mongo/operation/write/command/insert.rb +4 -2
  71. data/lib/mongo/operation/write/command/update.rb +6 -3
  72. data/lib/mongo/operation/write/gle.rb +2 -1
  73. data/lib/mongo/operation/write/idable.rb +19 -2
  74. data/lib/mongo/options/mapper.rb +22 -0
  75. data/lib/mongo/protocol/bit_vector.rb +3 -3
  76. data/lib/mongo/protocol/delete.rb +15 -5
  77. data/lib/mongo/protocol/get_more.rb +10 -5
  78. data/lib/mongo/protocol/insert.rb +1 -6
  79. data/lib/mongo/protocol/kill_cursors.rb +14 -1
  80. data/lib/mongo/protocol/message.rb +32 -8
  81. data/lib/mongo/protocol/serializers.rb +15 -16
  82. data/lib/mongo/protocol/update.rb +35 -12
  83. data/lib/mongo/server/connectable.rb +3 -1
  84. data/lib/mongo/server/connection.rb +5 -5
  85. data/lib/mongo/server/description.rb +8 -2
  86. data/lib/mongo/server/description/features.rb +2 -1
  87. data/lib/mongo/server/monitor.rb +1 -12
  88. data/lib/mongo/server/monitor/connection.rb +30 -26
  89. data/lib/mongo/server_selector/selectable.rb +21 -4
  90. data/lib/mongo/uri.rb +2 -0
  91. data/lib/mongo/version.rb +1 -1
  92. data/lib/mongo/write_concern.rb +21 -6
  93. data/mongo.gemspec +1 -2
  94. data/spec/mongo/bulk_write/ordered_combiner_spec.rb +13 -0
  95. data/spec/mongo/bulk_write_spec.rb +58 -0
  96. data/spec/mongo/client_spec.rb +6 -4
  97. data/spec/mongo/collection/view/builder/find_command_spec.rb +167 -0
  98. data/spec/mongo/collection/view/builder/flags_spec.rb +106 -0
  99. data/spec/mongo/collection/view/builder/modifiers_spec.rb +210 -0
  100. data/spec/mongo/collection/view/builder/op_query_spec.rb +154 -0
  101. data/spec/mongo/collection/view/explainable_spec.rb +1 -2
  102. data/spec/mongo/collection/view/immutable_spec.rb +3 -52
  103. data/spec/mongo/collection/view/map_reduce_spec.rb +12 -12
  104. data/spec/mongo/collection/view/readable_spec.rb +86 -80
  105. data/spec/mongo/collection/view_spec.rb +109 -703
  106. data/spec/mongo/collection_spec.rb +594 -11
  107. data/spec/mongo/command_monitoring_spec.rb +40 -27
  108. data/spec/mongo/cursor/builder/get_more_command_spec.rb +160 -0
  109. data/spec/mongo/cursor/builder/op_get_more_spec.rb +52 -0
  110. data/spec/mongo/cursor_spec.rb +10 -60
  111. data/spec/mongo/database_spec.rb +24 -3
  112. data/spec/mongo/dbref_spec.rb +4 -4
  113. data/spec/mongo/grid/file/chunk_spec.rb +1 -1
  114. data/spec/mongo/grid/fs_bucket_spec.rb +3 -3
  115. data/spec/mongo/index/view_spec.rb +41 -0
  116. data/spec/mongo/operation/{aggregate → commands/aggregate}/result_spec.rb +1 -1
  117. data/spec/mongo/operation/commands/aggregate_spec.rb +1 -1
  118. data/spec/mongo/operation/commands/collections_info_spec.rb +1 -1
  119. data/spec/mongo/operation/commands/command_spec.rb +1 -1
  120. data/spec/mongo/operation/commands/indexes_spec.rb +1 -1
  121. data/spec/mongo/operation/commands/map_reduce_spec.rb +1 -1
  122. data/spec/mongo/operation/write/command/delete_spec.rb +25 -0
  123. data/spec/mongo/operation/write/command/insert_spec.rb +25 -0
  124. data/spec/mongo/operation/write/command/update_spec.rb +25 -0
  125. data/spec/mongo/protocol/delete_spec.rb +4 -4
  126. data/spec/mongo/protocol/get_more_spec.rb +4 -4
  127. data/spec/mongo/protocol/insert_spec.rb +3 -3
  128. data/spec/mongo/protocol/kill_cursors_spec.rb +3 -3
  129. data/spec/mongo/protocol/query_spec.rb +7 -7
  130. data/spec/mongo/protocol/update_spec.rb +5 -5
  131. data/spec/mongo/server/description/features_spec.rb +25 -0
  132. data/spec/mongo/write_concern_spec.rb +126 -0
  133. data/spec/spec_helper.rb +9 -19
  134. data/spec/support/command_monitoring.rb +8 -0
  135. data/spec/support/command_monitoring/find.yml +53 -4
  136. data/spec/support/matchers.rb +1 -1
  137. data/spec/support/shared/protocol.rb +5 -5
  138. data/spec/support/travis.rb +1 -1
  139. metadata +43 -10
  140. metadata.gz.sig +0 -0
@@ -14,97 +14,79 @@
14
14
 
15
15
  module Mongo
16
16
  module Operation
17
- class ListCollections
17
+ module Commands
18
+ class ListCollections
18
19
 
19
- # Defines custom behaviour of results when using the
20
- # listCollections command.
21
- #
22
- # @since 2.0.0
23
- class Result < Operation::Result
24
-
25
- # The field name for the cursor document in a listCollections result.
26
- #
27
- # @since 2.0.0
28
- CURSOR = 'cursor'.freeze
29
-
30
- # The cursor id field in the cursor document.
31
- #
32
- # @since 2.0.0
33
- CURSOR_ID = 'id'.freeze
34
-
35
- # The namespace field in the cursor document.
36
- #
37
- # @since 2.0.0
38
- NAMESPACE = 'ns'.freeze
39
-
40
- # The field name for the first batch of a cursor.
20
+ # Defines custom behaviour of results when using the
21
+ # listCollections command.
41
22
  #
42
23
  # @since 2.0.0
43
- FIRST_BATCH = 'firstBatch'.freeze
24
+ class Result < Operation::Result
44
25
 
45
- # Get the cursor id for the result.
46
- #
47
- # @example Get the cursor id.
48
- # result.cursor_id
49
- #
50
- # @note Even though the wire protocol has a cursor_id field for all
51
- # messages of type reply, it is always zero when using the
52
- # listCollections command and must be retrieved from the cursor
53
- # document itself.
54
- #
55
- # @return [ Integer ] The cursor id.
56
- #
57
- # @since 2.0.0
58
- def cursor_id
59
- cursor_document ? cursor_document[CURSOR_ID] : super
60
- end
26
+ # Get the cursor id for the result.
27
+ #
28
+ # @example Get the cursor id.
29
+ # result.cursor_id
30
+ #
31
+ # @note Even though the wire protocol has a cursor_id field for all
32
+ # messages of type reply, it is always zero when using the
33
+ # listCollections command and must be retrieved from the cursor
34
+ # document itself.
35
+ #
36
+ # @return [ Integer ] The cursor id.
37
+ #
38
+ # @since 2.0.0
39
+ def cursor_id
40
+ cursor_document ? cursor_document[CURSOR_ID] : super
41
+ end
61
42
 
62
- # Get the namespace for the cursor.
63
- #
64
- # @example Get the namespace.
65
- # result.namespace
66
- #
67
- # @return [ String ] The namespace.
68
- #
69
- # @since 2.0.0
70
- def namespace
71
- cursor_document ? cursor_document[NAMESPACE] : super
72
- end
43
+ # Get the namespace for the cursor.
44
+ #
45
+ # @example Get the namespace.
46
+ # result.namespace
47
+ #
48
+ # @return [ String ] The namespace.
49
+ #
50
+ # @since 2.0.0
51
+ def namespace
52
+ cursor_document ? cursor_document[NAMESPACE] : super
53
+ end
73
54
 
74
- # Get the documents for the listCollections result. It is the 'firstBatch'
75
- # field in the 'cursor' field of the first document returned.
76
- #
77
- # @example Get the documents.
78
- # result.documents
79
- #
80
- # @return [ Array<BSON::Document> ] The documents.
81
- #
82
- # @since 2.0.0
83
- def documents
84
- cursor_document[FIRST_BATCH]
85
- end
55
+ # Get the documents for the listCollections result. It is the 'firstBatch'
56
+ # field in the 'cursor' field of the first document returned.
57
+ #
58
+ # @example Get the documents.
59
+ # result.documents
60
+ #
61
+ # @return [ Array<BSON::Document> ] The documents.
62
+ #
63
+ # @since 2.0.0
64
+ def documents
65
+ cursor_document[FIRST_BATCH]
66
+ end
86
67
 
87
- # Validate the result. In the case where an unauthorized client tries
88
- # to run the command we need to generate the proper error.
89
- #
90
- # @example Validate the result.
91
- # result.validate!
92
- #
93
- # @return [ Result ] Self if successful.
94
- #
95
- # @since 2.0.0
96
- def validate!
97
- !successful? ? raise(Error::OperationFailure.new(parser.message)) : self
98
- end
68
+ # Validate the result. In the case where an unauthorized client tries
69
+ # to run the command we need to generate the proper error.
70
+ #
71
+ # @example Validate the result.
72
+ # result.validate!
73
+ #
74
+ # @return [ Result ] Self if successful.
75
+ #
76
+ # @since 2.0.0
77
+ def validate!
78
+ !successful? ? raise(Error::OperationFailure.new(parser.message)) : self
79
+ end
99
80
 
100
- private
81
+ private
101
82
 
102
- def cursor_document
103
- @cursor_document ||= first_document[CURSOR]
104
- end
83
+ def cursor_document
84
+ @cursor_document ||= first_document[CURSOR]
85
+ end
105
86
 
106
- def first_document
107
- @first_document ||= reply.documents[0]
87
+ def first_document
88
+ @first_document ||= reply.documents[0]
89
+ end
108
90
  end
109
91
  end
110
92
  end
@@ -12,45 +12,37 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'mongo/operation/commands/list_indexes/result'
16
-
17
15
  module Mongo
18
16
  module Operation
19
-
20
- # A MongoDB listIndexes command operation.
21
- #
22
- # @example Create the listIndexes command operation.
23
- # Mongo::Operation::Read::ListIndexes.new({ db_name: 'test', coll_name: 'example' })
24
- #
25
- # @note A command is actually a query on the virtual '$cmd' collection.
26
- #
27
- # Initialization:
28
- # param [ Hash ] spec The specifications for the command.
29
- #
30
- # option spec :coll_name [ Hash ] The name of the collection whose index
31
- # info is requested.
32
- # option spec :db_name [ String ] The name of the database on which
33
- # the command should be executed.
34
- # option spec :options [ Hash ] Options for the command.
35
- #
36
- # @since 2.0.0
37
- class ListIndexes
38
- include Specifiable
39
- include Limited
40
- include Executable
41
- include ReadPreference
42
-
43
- private
44
-
45
- def query_coll
46
- Database::COMMAND
47
- end
48
-
49
- def selector
50
- (spec[SELECTOR] || {}).merge(listIndexes: coll_name)
17
+ module Commands
18
+
19
+ # A MongoDB listIndexes command operation.
20
+ #
21
+ # @example Create the listIndexes command operation.
22
+ # Mongo::Operation::Read::ListIndexes.new({ db_name: 'test', coll_name: 'example' })
23
+ #
24
+ # @note A command is actually a query on the virtual '$cmd' collection.
25
+ #
26
+ # Initialization:
27
+ # param [ Hash ] spec The specifications for the command.
28
+ #
29
+ # option spec :coll_name [ Hash ] The name of the collection whose index
30
+ # info is requested.
31
+ # option spec :db_name [ String ] The name of the database on which
32
+ # the command should be executed.
33
+ # option spec :options [ Hash ] Options for the command.
34
+ #
35
+ # @since 2.0.0
36
+ class ListIndexes < Command
37
+
38
+ private
39
+
40
+ def selector
41
+ (spec[SELECTOR] || {}).merge(listIndexes: coll_name)
42
+ end
51
43
  end
52
44
  end
53
45
  end
54
46
  end
55
47
 
56
-
48
+ require 'mongo/operation/commands/list_indexes/result'
@@ -14,101 +14,83 @@
14
14
 
15
15
  module Mongo
16
16
  module Operation
17
- class ListIndexes
17
+ module Commands
18
+ class ListIndexes
18
19
 
19
- # Defines custom behaviour of results when using the
20
- # listIndexes command.
21
- #
22
- # @since 2.0.0
23
- class Result < Operation::Result
24
-
25
- # The field name for the cursor document in a listIndexes result.
20
+ # Defines custom behaviour of results when using the
21
+ # listIndexes command.
26
22
  #
27
23
  # @since 2.0.0
28
- CURSOR = 'cursor'.freeze
24
+ class Result < Operation::Result
29
25
 
30
- # The cursor id field in the cursor document.
31
- #
32
- # @since 2.0.0
33
- CURSOR_ID = 'id'.freeze
26
+ # Get the cursor id for the result.
27
+ #
28
+ # @example Get the cursor id.
29
+ # result.cursor_id
30
+ #
31
+ # @note Even though the wire protocol has a cursor_id field for all
32
+ # messages of type reply, it is always zero when using the
33
+ # listIndexes command and must be retrieved from the cursor
34
+ # document itself.
35
+ #
36
+ # @return [ Integer ] The cursor id.
37
+ #
38
+ # @since 2.0.0
39
+ def cursor_id
40
+ cursor_document ? cursor_document[CURSOR_ID] : super
41
+ end
34
42
 
35
- # The namespace field in the cursor document.
36
- #
37
- # @since 2.0.0
38
- NAMESPACE = 'ns'.freeze
43
+ # Get the namespace for the cursor.
44
+ #
45
+ # @example Get the namespace.
46
+ # result.namespace
47
+ #
48
+ # @return [ String ] The namespace.
49
+ #
50
+ # @since 2.0.0
51
+ def namespace
52
+ cursor_document ? cursor_document[NAMESPACE] : super
53
+ end
39
54
 
40
- # The field name for the first batch of a cursor.
41
- #
42
- # @since 2.0.0
43
- FIRST_BATCH = 'firstBatch'.freeze
55
+ # Get the documents for the listIndexes result. This is the 'firstBatch'
56
+ # field in the 'cursor' field of the first document returned.
57
+ #
58
+ # @example Get the documents.
59
+ # result.documents
60
+ #
61
+ # @return [ Array<BSON::Document> ] The documents.
62
+ #
63
+ # @since 2.0.0
64
+ def documents
65
+ cursor_document[FIRST_BATCH]
66
+ end
44
67
 
45
- # Get the cursor id for the result.
46
- #
47
- # @example Get the cursor id.
48
- # result.cursor_id
49
- #
50
- # @note Even though the wire protocol has a cursor_id field for all
51
- # messages of type reply, it is always zero when using the
52
- # listIndexes command and must be retrieved from the cursor
53
- # document itself.
54
- #
55
- # @return [ Integer ] The cursor id.
56
- #
57
- # @since 2.0.0
58
- def cursor_id
59
- cursor_document ? cursor_document[CURSOR_ID] : super
60
- end
68
+ # Validate the result. In the case where the database or collection
69
+ # does not exist on the server we will get an error, and it's better
70
+ # to raise a meaningful exception here than the ambiguous one when
71
+ # the error occurs.
72
+ #
73
+ # @example Validate the result.
74
+ # result.validate!
75
+ #
76
+ # @raise [ NoNamespace ] If the ns doesn't exist.
77
+ #
78
+ # @return [ Result ] Self if successful.
79
+ #
80
+ # @since 2.0.0
81
+ def validate!
82
+ !successful? ? raise(Error::OperationFailure.new(parser.message)) : self
83
+ end
61
84
 
62
- # Get the namespace for the cursor.
63
- #
64
- # @example Get the namespace.
65
- # result.namespace
66
- #
67
- # @return [ String ] The namespace.
68
- #
69
- # @since 2.0.0
70
- def namespace
71
- cursor_document ? cursor_document[NAMESPACE] : super
72
- end
73
-
74
- # Get the documents for the listIndexes result. This is the 'firstBatch'
75
- # field in the 'cursor' field of the first document returned.
76
- #
77
- # @example Get the documents.
78
- # result.documents
79
- #
80
- # @return [ Array<BSON::Document> ] The documents.
81
- #
82
- # @since 2.0.0
83
- def documents
84
- cursor_document[FIRST_BATCH]
85
- end
86
-
87
- # Validate the result. In the case where the database or collection
88
- # does not exist on the server we will get an error, and it's better
89
- # to raise a meaningful exception here than the ambiguous one when
90
- # the error occurs.
91
- #
92
- # @example Validate the result.
93
- # result.validate!
94
- #
95
- # @raise [ NoNamespace ] If the ns doesn't exist.
96
- #
97
- # @return [ Result ] Self if successful.
98
- #
99
- # @since 2.0.0
100
- def validate!
101
- !successful? ? raise(Error::OperationFailure.new(parser.message)) : self
102
- end
85
+ private
103
86
 
104
- private
105
-
106
- def cursor_document
107
- @cursor_document ||= first_document[CURSOR]
108
- end
87
+ def cursor_document
88
+ @cursor_document ||= first_document[CURSOR]
89
+ end
109
90
 
110
- def first_document
111
- @first_document ||= reply.documents[0]
91
+ def first_document
92
+ @first_document ||= reply.documents[0]
93
+ end
112
94
  end
113
95
  end
114
96
  end
@@ -12,46 +12,38 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'mongo/operation/commands/map_reduce/result'
16
-
17
15
  module Mongo
18
16
  module Operation
19
- # A MongoDB map reduce operation.
20
- #
21
- # @note A map/reduce operation can behave like a read and
22
- # return a result set, or can behave like a write operation and
23
- # output results to a user-specified collection.
24
- #
25
- # @example Create the map/reduce operation.
26
- # MapReduce.new({
27
- # :selector => {
28
- # :mapreduce => 'test_coll',
29
- # :map => '',
30
- # :reduce => ''
31
- # },
32
- # :db_name => 'test_db'
33
- # })
34
- #
35
- # Initialization:
36
- # param [ Hash ] spec The specifications for the operation.
37
- #
38
- # option spec :selector [ Hash ] The map reduce selector.
39
- # option spec :db_name [ String ] The name of the database on which
40
- # the operation should be executed.
41
- # option spec :options [ Hash ] Options for the map reduce command.
42
- #
43
- # @since 2.0.0
44
- class MapReduce
45
- include Specifiable
46
- include Limited
47
- include ReadPreference
48
- include Executable
49
-
50
- private
17
+ module Commands
51
18
 
52
- def query_coll
53
- Database::COMMAND
54
- end
19
+ # A MongoDB map reduce operation.
20
+ #
21
+ # @note A map/reduce operation can behave like a read and
22
+ # return a result set, or can behave like a write operation and
23
+ # output results to a user-specified collection.
24
+ #
25
+ # @example Create the map/reduce operation.
26
+ # MapReduce.new({
27
+ # :selector => {
28
+ # :mapreduce => 'test_coll',
29
+ # :map => '',
30
+ # :reduce => ''
31
+ # },
32
+ # :db_name => 'test_db'
33
+ # })
34
+ #
35
+ # Initialization:
36
+ # param [ Hash ] spec The specifications for the operation.
37
+ #
38
+ # option spec :selector [ Hash ] The map reduce selector.
39
+ # option spec :db_name [ String ] The name of the database on which
40
+ # the operation should be executed.
41
+ # option spec :options [ Hash ] Options for the map reduce command.
42
+ #
43
+ # @since 2.0.0
44
+ class MapReduce < Command; end
55
45
  end
56
46
  end
57
47
  end
48
+
49
+ require 'mongo/operation/commands/map_reduce/result'