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

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

        return json_encode($metadataHash);
    }
public function getIndexMetadata ( Document $ document ) { $ metadataHash = array ( 'index' => array ( '_type' => $ document -> type , '_id' => $ document -> id , ) , ) ; return json_encode ( $ metadataHash ) ; }
Returns bulk metadata for creating a new document or replacing an existing document.

Note: _index parameter is omitted because it is configurable
on a gateway and passed as a part of the REST resource
in {@link \eZ\Publish\Core\Search\Elasticsearch\Content\Gateway::bulkIndex()}.

@see \eZ\Publish\Core\Search\Elasticsearch\Content\Gateway::bulkIndex()

@param \eZ\Publish\Core\Search\Elasticsearch\Content\Document $document

@return string
Returns bulk metadata for creating a new document or replacing an existing document .