src/Repository/DocumentRepository.php
public function create($index, $type, $document)
    {
        $request = $this->createRequestInstance(self::CREATE_DOCUMENT, $index, $type);
        $request->setBody($document);

        return $this->client->send($request);
    }
public function create($index, $type, $document)
    {
        $request = $this->createRequestInstance(self::CREATE_DOCUMENT, $index, $type);
        $request->setBody($document);

        return $this->client->send($request);
    }
public function create ( $ index , $ type , $ document ) { $ request = $ this -> createRequestInstance ( self :: CREATE_DOCUMENT , $ index , $ type ) ; $ request -> setBody ( $ document ) ; return $ this -> client -> send ( $ request ) ; }
creates a document

@param string $index
@param string $type
@param mixed  $document

@return \Elastification\Client\Response\ResponseInterface
@author Daniel Wendlandt
creates a document