/** * {@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; }
/** * {@inheritDoc} */ public function refreshIndex(IndexInterface $index) { try { $this->client->indices()->refresh(['index' => $index->getName()]); } catch (\Exception $e) { $this->logger->error($e->getMessage()); } return $this; }