diff --git a/src/Plugin/search_api/backend/SearchApiSolrBackend.php b/src/Plugin/search_api/backend/SearchApiSolrBackend.php
index 4916171..48ad95d 100644
--- a/src/Plugin/search_api/backend/SearchApiSolrBackend.php
+++ b/src/Plugin/search_api/backend/SearchApiSolrBackend.php
@@ -46,6 +46,7 @@ use Solarium\QueryType\Suggester\Query as SuggesterQuery;
 use Solarium\QueryType\Suggester\Result\Result as SuggesterResult;
 use Solarium\QueryType\Update\Query\Document\Document;
 use Symfony\Component\DependencyInjection\ContainerInterface;
+use Drupal\search_api\Item\Field;
 
 /**
  * The minimum required Solr schema version.
@@ -2459,7 +2460,9 @@ class SearchApiSolrBackend extends BackendPluginBase implements SolrBackendInter
       $group_params['group.facet'] = 'true';
     }
     foreach ($grouping_options['fields'] as $collapse_field) {
-      $type = $index_fields[$collapse_field]['type'];
+      /** @var $field Field $type */
+      $field = $index_fields[$collapse_field];
+      $type = $field->getType();
       // Only single-valued fields are supported.
       if (SearchApiUtility::isTextType($type)) {
         $warnings[] = $this->t('Grouping is not supported for field @field. Only single-valued fields not indexed as "Fulltext" are supported.',
