kevin-xw / rock-php

Automatically exported from code.google.com/p/rock-php
0 stars 0 forks source link

MongoCode (javascript functions) is not supported #155

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. If we store MongoCode in collection via mongo shell, RockMongo shows it like 
a usual string. After edit in RockMongo type of field becomes string.

2. {
  mapReduce: 'measures',
  map: 'function(){ 
    this.scheme.foreach(
        function(value){ 
            emit(value.id, {dt: this.measureTime, status: value.status} )
        });  
  }',
  out: 'schemeView'
}

returns error 
{
   "assertion": "not code",
   "assertionCode": 10062,
   "errmsg": "db assertion failure",
   "ok": 0 
}

RockMongo version   1.0.12

Operation System Ubuntu
Web server  Apache/2.2.17
PHP version PHP 5.3.5-1ubuntu7.2
PHP extension   mongo/1.1.4

MongoDB version 1.8.0

Original issue reported on code.google.com by menta...@gmail.com on 2 Aug 2011 at 7:18

GoogleCodeExporter commented 9 years ago
1. The bug is fixed, just download latest version here: 
http://rockmongo.com/downloads
2. map in MapReduce should be a function, you input it as a string. 

and a help here:
http://rockmongo.com/wiki/faq?lang=en_us#%23%23%23%23+How+to+MapReduce%0D

Original comment by iwind....@gmail.com on 10 May 2012 at 12:45