public function getDocumentSort()
    {
        if (!$this->valid()) {
            throw new \LogicException('Document sort is available only while iterating over results.');
        }

        if (!isset($this->documents[$this->key]['sort'])) {
            return null;
        }

        return $this->documents[$this->key]['sort'][0];
    }