/** * set if the record has to be indexed or removed from the index */ public function setisDeleted() { parent::setisDeleted(); // artefacts: if artefacttype is not selected, mark as deleted $artefacttypes = explode(',', get_config_plugin('search', 'elasticsearch', 'artefacttypes')); if (!in_array($this->mapping['artefacttype'], $artefacttypes)) { $this->isDeleted = true; } }