public function aggregate(array $pipeline, array $options = array())
    {
        $command = array(
            'aggregate' => $this->getCollectionName(),
            'pipeline' => $pipeline
        );
        $result = $this->command($command, $options);

        return $result['result'];
    }