public function remove($id, $routing = null)
    {
        $params = [
            'index' => $this->getManager()->getIndexName(),
            'type' => $this->type,
            'id' => $id,
        ];

        if ($routing) {
            $params['routing'] = $routing;
        }

        $response = $this->getManager()->getClient()->delete($params);

        return $response;
    }
public function remove($id, $routing = null)
    {
        $params = [
            'index' => $this->getManager()->getIndexName(),
            'type' => $this->type,
            'id' => $id,
        ];

        if ($routing) {
            $params['routing'] = $routing;
        }

        $response = $this->getManager()->getClient()->delete($params);

        return $response;
    }
public function remove ( $ id , $ routing = null ) { $ params = [ 'index' => $ this -> getManager ( ) -> getIndexName ( ) , 'type' => $ this -> type , 'id' => $ id , ] ; if ( $ routing ) { $ params [ 'routing' ] = $ routing ; } $ response = $ this -> getManager ( ) -> getClient ( ) -> delete ( $ params ) ; return $ response ; }
Removes a single document data by ID.

@param string $id      Document ID to remove
@param string $routing Custom routing for the document

@return array

@throws \LogicException
Removes a single document data by ID .