## New ContinueOnError Option for Bulk Insert 

Set the continueOnError option for bulk inserts, in the driver , so that bulk insert will continue to insert any remaining documents even if an insert fails, as is the case with duplicate key exceptions or network interruptions. The getLastError command will report whether any inserts have failed, not just the last one. If multiple errors occur, the client will only receive the most recent getLastError results. 

Note: For bulk inserts on sharded clusters, the getLastError command alone is insufficient to verify success. Applications should must verify the success of bulk inserts in application logic. 

## Map Reduce 

Output to a Sharded Collection Using the new sharded flag, it is possible to send the result of a map/reduce to a sharded collection. Combined with the reduce or merge flags, it is possible to keep adding data to very large collections from map/reduce jobs. 

For more information, see Map-Reduce (page 442) and the mapReduce reference. 

Performance Improvements Map/reduce performance will benefit from the following: 

• Larger in-memory buffer sizes, reducing the amount of disk I/O needed during a job 

• Larger javascript heap size, allowing for larger objects and less GC 

• Supports pure JavaScript execution with the jsMode flag. See the mapReduce reference. 

## New Querying Features 

Additional regex options: s Allows the dot ( . ) to match all characters including new lines. This is in addition to the currently supported i , m and x . See $regex . 

$and A special boolean $and query operator is now available. 

## Command Output Changes 

The output of the validate command and the documents in the system.profile collection have both been enhanced to return information as BSON objects with keys for each value rather than as free-form strings. 

## Shell Features 

Custom Prompt You can define a custom prompt for the mongo shell. You can change the prompt at any time by setting the prompt variable to a string or a custom JavaScript function returning a string. For examples, see Use a Custom Prompt (page 274). 

Default Shell Init Script On startup, the shell will check for a .mongorc.js file in the user’s home directory. The shell will execute this file after connecting to the database and before displaying the prompt. 

If you would like the shell not to run the .mongorc.js file automatically, start the shell with --norc . 

For more information, see the mongo reference. 

