public function delete(\Smile\ElasticsuiteThesaurus\Api\Data\ThesaurusInterface $thesaurus)
    {
        $thesaurusId = $thesaurus->getThesaurusId();

        $thesaurus->delete();

        if (isset($this->thesaurusRepositoryById[$thesaurusId])) {
            unset($this->thesaurusRepositoryById[$thesaurusId]);
        }

        return $thesaurus;
    }