I'm using the PHP client, and I'm trying to remove all members of the "changes" array where "idx" is less than 50.
$db->documents->update(
array(
'_id'=>$doc['_id']
),
array(
'$pull' => array(
'changes' => array(
'idx' => array(
'$lt' => 50
)
)
)
)
);
This code doesn't seem to work--worse, it makes my Apache process hang at 100% CPU until PHP times it out after 30 seconds. Anyway, how should I perform such an update?