Author: Aurelien FOUCRET (aurelien.foucret@smile.fr)
Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function updateDocument(IndexInterface $index, TypeInterface $type, $docId, array $data)
 {
     $this->bulkData[] = ['update' => ['_index' => $index->getName(), '_type' => $type->getName(), '_id' => $docId]];
     $this->bulkData[] = ['doc' => $data];
     return $this;
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  */
 public function refreshIndex(IndexInterface $index)
 {
     try {
         $this->client->indices()->refresh(['index' => $index->getName()]);
     } catch (\Exception $e) {
         $this->logger->error($e->getMessage());
     }
     return $this;
 }