730.saurabh Posted December 5, 2013 Share Posted December 5, 2013 I am new to mongodb.I am trying to pass parameter to mapreduce but it gives error as following,Setting up the file resolver... com.mongodb.util.JSONParseException: { 'collectionName' : 'range', mapReduce : { map : 'function () { if(this.user == {'select':null}){ emit (this._id,{userid:this.user.valueOf()}); } For some reason the parameter is returned as null. My map function is as follows,map : 'function () { if(this.user == $P{select}) { emit (this._id,{userid:this.user.valueOf()}); } }',Can anyone please point out my mistake? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now