/**
  * Add custom data to index document (you can override to add custom fields
  * to the search index)
  *
  * @param HasNodeInterface $page
  * @param array            $doc
  */
 protected function addCustomData(HasNodeInterface $page, &$doc)
 {
     $event = new IndexNodeEvent($page, $doc);
     $this->container->get('event_dispatcher')->dispatch(IndexNodeEvent::EVENT_INDEX_NODE, $event);
     $doc = $event->doc;
     if ($page instanceof HasCustomSearchDataInterface) {
         $doc += $page->getCustomSearchData($doc);
     }
 }