Think/Model/MongoModel.php
public function group($key, $init, $reduce, $option = [])
    {
        $option = $this->_parseOptions($option);

        //合并查询条件
        if (isset($option['where'])) {
            $option['condition'] = array_merge((array)$option['condition'], $option['where']);
        }

        return $this->db->group($key, $init, $reduce, $option);
    }
public function group($key, $init, $reduce, $option = [])
    {
        $option = $this->_parseOptions($option);

        //合并查询条件
        if (isset($option['where'])) {
            $option['condition'] = array_merge((array)$option['condition'], $option['where']);
        }

        return $this->db->group($key, $init, $reduce, $option);
    }
分组查询

@return string