/** * Schedule node removal into the current bulk request. * * @param NodeInterface $node * @return string */ public function removeNode(NodeInterface $node) { // TODO: handle deletion from the fulltext index as well $identifier = sha1($node->getContextPath()); $this->currentBulkRequest[] = array(array('delete' => array('_type' => NodeTypeMappingBuilder::convertNodeTypeNameToMappingName($node->getNodeType()), '_id' => $identifier))); $this->logger->log(sprintf('NodeIndexer: Removed node %s from index (node actually removed). Persistence ID: %s', $node->getContextPath(), $identifier), LOG_DEBUG, NULL, 'ElasticSearch (CR)'); }
/** * Schedule node removal into the current bulk request. * * @param NodeInterface $node * @return string */ public function removeNode(NodeInterface $node) { if ($this->settings['indexAllWorkspaces'] === false) { if ($node->getContext()->getWorkspaceName() !== 'live') { return; } } // TODO: handle deletion from the fulltext index as well $identifier = sha1($node->getContextPath()); $this->currentBulkRequest[] = [['delete' => ['_type' => NodeTypeMappingBuilder::convertNodeTypeNameToMappingName($node->getNodeType()), '_id' => $identifier]]]; $this->logger->log(sprintf('NodeIndexer: Removed node %s from index (node actually removed). Persistence ID: %s', $node->getContextPath(), $identifier), LOG_DEBUG, null, 'ElasticSearch (CR)'); }