I just rewrote the code using the mongo driver directly:
use Mongo;
$m = new Mongo();
$db = $m->selectDB("mydb");
instead of lithium's
$db = Model::connection();
Which I assume bypasses the lithium layer, and I get exactly the same
results. Which means that either a) i'm doing something stupidly or
obviously wrong, or b) the PHP driver is at fault (which seems a
little unlikely).
Any suggestions on how to debug further?
On Aug 19, 10:32 am, Sam Millman <
sam.mill...@gmail.com> wrote:
> But the author of the PHP driver actually is in this group. So this is the
> best place to post really.
>
> On 19 August 2011 10:29, Sam Millman <
sam.mill...@gmail.com> wrote:
>
>
>
> > It can't be the PHP driver cos I use it and MR works fine for me using:
>
> > $rs = Glue::Db()->command(array(
> > "mapreduce"=>$this->getCollectionName(),
> > "map"=>$map,
> > "reduce"=>new MongoCode("function(key, values) {
> > var docs = '';
> > values.forEach ( function(val) { docs = val; })
> > return docs;
> > }"),
> > "scope"=>array('terms'=>null),
> > "query"=>array(),
> > "out"=>session_id()."_rsearch",
> > ));
>
> > I got no construct error about it and you shouldn't.
>
> > Also casting query param as an object effects my results where as it does
> > not effect your results.
>
> > Basically Lith has most likely put a layer on top of the command() function
> > and it is broken.
>
> >>
http://groups.google.com/group/mongodb-user?hl=en.- Hide quoted text -
>
> - Show quoted text -