Пример #1
0
 public function delete($id)
 {
     $path = $this->_getPath($id);
     $request = new Garp_Service_Elasticsearch_Request('DELETE', $path);
     $response = $request->execute();
     return $response->isOk();
 }
Пример #2
0
 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;
 }