Class MapReduceOptions
java.lang.Object
org.springframework.data.mongodb.core.mapreduce.MapReduceOptions
Deprecated.
- Author:
- Mark Pollack, Oliver Gierke, Christoph Strobl, Mark Paluch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.With this option, no collection will be created, and the whole map-reduce operation will happen in RAM.Deprecated.This option will merge new data into the old output collection.Deprecated.If documents exists for a given key in the result set and in the old collection, then a reduce operation (using the specified reduce function) will be performed on the two values and the result will be written to the output collection.Deprecated.The output will be inserted into a collection which will atomically replace any existing collection with the same name.Deprecated.Define the Collation specifying language-specific rules for string comparison.protected org.bson.Document
Deprecated.finalizeFunction
(String finalizeFunction) Deprecated.Sets the finalize functionDeprecated.Get the Collation specifying language-specific rules for string comparison.Deprecated.Deprecated.getLimit()
Deprecated.Get the maximum number of documents for the input into the map function.com.mongodb.client.model.MapReduceAction
Deprecated.Return theMapReduceAction
.org.bson.Document
Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.javaScriptMode
(boolean javaScriptMode) Deprecated.Flag that toggles behavior in the map-reduce operation so as to avoid intermediate conversion to BSON between the map and reduce steps.limit
(int limit) Deprecated.Limit the number of objects to return from the collection that is fed into the map reduce operation Often used in conjunction with a query and sort option so as to reduce the portion of the data that will be processed.static MapReduceOptions
options()
Deprecated.Static factory method to create a MapReduceOptions instanceoutputCollection
(String collectionName) Deprecated.The collection where the results from the map-reduce operation will be stored.outputDatabase
(String outputDatabase) Deprecated.The database where the results from the map-reduce operation will be stored.outputSharded
(boolean outputShared) Deprecated.If true and combined with an output mode that writes to a collection, the output collection will be sharded using the _id field.scopeVariables
(Map<String, Object> scopeVariables) Deprecated.Key-value pairs that are placed into JavaScript global scope and can be accessed from map, reduce, and finalize scripts.boolean
Deprecated.verbose
(boolean verbose) Deprecated.Flag to set that will provide statistics on job execution time.
-
Constructor Details
-
MapReduceOptions
public MapReduceOptions()Deprecated.
-
-
Method Details
-
options
Deprecated.Static factory method to create a MapReduceOptions instance- Returns:
- a new instance
-
limit
Deprecated.Limit the number of objects to return from the collection that is fed into the map reduce operation Often used in conjunction with a query and sort option so as to reduce the portion of the data that will be processed.- Parameters:
limit
- Limit the number of objects to process- Returns:
- MapReduceOptions so that methods can be chained in a fluent API style
-
outputCollection
Deprecated.The collection where the results from the map-reduce operation will be stored. Note, you can set the database name as well with the outputDatabase option.- Parameters:
collectionName
- The name of the collection where the results of the map-reduce operation will be stored.- Returns:
- MapReduceOptions so that methods can be chained in a fluent API style
-
outputDatabase
Deprecated.The database where the results from the map-reduce operation will be stored. Note, you ca set the collection name as well with the outputCollection option.- Parameters:
outputDatabase
- The name of the database where the results of the map-reduce operation will be stored.- Returns:
- MapReduceOptions so that methods can be chained in a fluent API style
-
actionInline
Deprecated.With this option, no collection will be created, and the whole map-reduce operation will happen in RAM. Also, the results of the map-reduce will be returned within the result object. Note that this option is possible only when the result set fits within the 16MB limit of a single document.- Returns:
- this.
- Since:
- 3.0
-
actionMerge
Deprecated.This option will merge new data into the old output collection. In other words, if the same key exists in both the result set and the old collection, the new key will overwrite the old one.- Returns:
- this.
- Since:
- 3.0
-
actionReduce
Deprecated.If documents exists for a given key in the result set and in the old collection, then a reduce operation (using the specified reduce function) will be performed on the two values and the result will be written to the output collection. If a finalize function was provided, this will be run after the reduce as well.- Returns:
- this.
- Since:
- 3.0
-
actionReplace
Deprecated.The output will be inserted into a collection which will atomically replace any existing collection with the same name. Note, the default isMapReduceAction.REPLACE
.- Returns:
- MapReduceOptions so that methods can be chained in a fluent API style
- Since:
- 3.0
-
outputSharded
Deprecated.If true and combined with an output mode that writes to a collection, the output collection will be sharded using the _id field. For MongoDB 1.9+- Parameters:
outputShared
- if true, output will be sharded based on _id key.- Returns:
- MapReduceOptions so that methods can be chained in a fluent API style
-
finalizeFunction
Deprecated.Sets the finalize function- Parameters:
finalizeFunction
- The finalize function. Can be a JSON string or a Spring Resource URL- Returns:
- MapReduceOptions so that methods can be chained in a fluent API style
-
scopeVariables
Deprecated.Key-value pairs that are placed into JavaScript global scope and can be accessed from map, reduce, and finalize scripts.- Parameters:
scopeVariables
- variables that can be accessed from map, reduce, and finalize scripts- Returns:
- MapReduceOptions so that methods can be chained in a fluent API style
-
javaScriptMode
Deprecated.Flag that toggles behavior in the map-reduce operation so as to avoid intermediate conversion to BSON between the map and reduce steps. For MongoDB 1.9+- Parameters:
javaScriptMode
- if true, have the execution of map-reduce stay in JavaScript- Returns:
- MapReduceOptions so that methods can be chained in a fluent API style
-
verbose
Deprecated.Flag to set that will provide statistics on job execution time.- Returns:
- MapReduceOptions so that methods can be chained in a fluent API style
-
collation
Deprecated.Define the Collation specifying language-specific rules for string comparison.- Parameters:
collation
- can be null.- Returns:
- Since:
- 2.0
-
getFinalizeFunction
Deprecated. -
getJavaScriptMode
Deprecated. -
getOutputCollection
Deprecated. -
getOutputDatabase
Deprecated. -
getOutputSharded
Deprecated. -
getScopeVariables
Deprecated. -
getLimit
Deprecated.Get the maximum number of documents for the input into the map function.- Returns:
- null if not set.
-
getCollation
Deprecated.Get the Collation specifying language-specific rules for string comparison.- Returns:
- Since:
- 2.0
-
getMapReduceAction
Deprecated.Return theMapReduceAction
.- Returns:
- the mapped action or null if the action maps to inline output.
- Since:
- 2.0.10
-
usesInlineOutput
public boolean usesInlineOutput()Deprecated.- Returns:
- true if inline output is used.
- Since:
- 2.0.10
-
getOptionsObject
public org.bson.Document getOptionsObject()Deprecated. -
createOutObject
protected org.bson.Document createOutObject()Deprecated.
-
org.springframework.data.mongodb.core.aggregation
.