public function getIndexMetadata(Document $document)
    {
        $metadataHash = array(
            'index' => array(
                '_type' => $document->type,
                '_id' => $document->id,
            ),
        );

        return json_encode($metadataHash);
    }