/**
  * Checks if 'synonyms' feature is supported by configured search engine. If not supported displays a notice
  *
  * @return void
  */
 protected function checkSearchEngineSupport()
 {
     // Display a notice if search engine configuration does not support synonyms
     $searchEngine = $this->engineResolver->getCurrentSearchEngine();
     if (!$this->searchFeatureConfig->isFeatureSupported(\Magento\Framework\Search\SearchEngine\ConfigInterface::SEARCH_ENGINE_FEATURE_SYNONYMS, $searchEngine)) {
         $this->messageManager->addNoticeMessage(__('Search synonyms are not supported by the %1 search engine. ' . 'Any synonyms you enter won\'t be used.', $searchEngine));
     }
 }
 /**
  * Removes 'Search Synonyms' from the menu if 'synonyms' is not supported
  *
  * @param Builder $subject
  * @param Menu $menu
  * @return Menu
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 public function afterGetResult(Builder $subject, Menu $menu)
 {
     $searchEngine = $this->engineResolver->getCurrentSearchEngine();
     if (!$this->searchFeatureConfig->isFeatureSupported(ConfigInterface::SEARCH_ENGINE_FEATURE_SYNONYMS, $searchEngine)) {
         // "Search Synonyms" feature is not supported by the current configured search engine.
         // Menu will be updated to remove it from the list
         $menu->remove(self::SEARCH_SYNONYMS_MENU_ITEM_ID);
     }
     return $menu;
 }