public function delete($id) { $path = $this->_getPath($id); $request = new Garp_Service_Elasticsearch_Request('DELETE', $path); $response = $request->execute(); return $response->isOk(); }
public function remap() { $mappingJson = $this->_getMapping(); $mapping = json_decode($mappingJson, true); foreach ($mapping as $type => $typeMapping) { $path = '/' . $type . '/_mapping'; $typeMappingJson = json_encode(array($type => $typeMapping)); $request = new Garp_Service_Elasticsearch_Request('PUT', $path, $mapping); $response = $request->execute(); } return true; }