|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
namespace Drupal\my_module; |
|
|
|
|
namespace Drupal\roblib_alter_solr; |
|
|
|
|
|
|
|
|
|
use Drupal\search_api\IndexInterface; |
|
|
|
|
use Drupal\search_api\Item\ItemInterface; |
|
|
|
@ -30,7 +30,7 @@ class SolrDocumentAlterSubscriber implements EventSubscriberInterface {
|
|
|
|
|
$solrDocument = $event->getSolrDocument(); |
|
|
|
|
$item = $event->getItem(); |
|
|
|
|
$index = $event->getIndex(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($item->hasField('field_geo_area_name')) { |
|
|
|
|
$value = $item->getField('field_geo_area_name')->getValue(); |
|
|
|
|
$solrDocument->addField('dc.coverage', $value); |
|
|
|
|