diff --git a/src/Form/IndexAddFieldsForm.php b/src/Form/IndexAddFieldsForm.php
index 21139a7..6341587 100644
--- a/src/Form/IndexAddFieldsForm.php
+++ b/src/Form/IndexAddFieldsForm.php
@@ -363,7 +363,7 @@ class IndexAddFieldsForm extends EntityForm {
       $parent_child_type = NULL;
       if ($property instanceof ComplexDataDefinitionInterface) {
         $can_be_indexed = FALSE;
-        $nested_properties = $property->getPropertyDefinitions();
+        $nested_properties = Utility::getNestedProperties($property);
         $main_property = $property->getMainPropertyName();
         if ($main_property && isset($nested_properties[$main_property])) {
           $parent_child_type = $property->getDataType() . '.';
diff --git a/src/Item/Field.php b/src/Item/Field.php
index 98b4b63..5d8efaf 100644
--- a/src/Item/Field.php
+++ b/src/Item/Field.php
@@ -382,7 +382,8 @@ class Field implements \IteratorAggregate, FieldInterface {
     if (!$property instanceof ComplexDataDefinitionInterface) {
       return NULL;
     }
-    return $this->getNestedDefinition($property->getPropertyDefinitions(), $keys);
+    $nested_properties = Utility::getNestedProperties($property);
+    return $this->getNestedDefinition($nested_properties, $keys);
   }
 
   /**
diff --git a/src/Tests/IntegrationTest.php b/src/Tests/IntegrationTest.php
index e43e9e4..b028c07 100644
--- a/src/Tests/IntegrationTest.php
+++ b/src/Tests/IntegrationTest.php
@@ -76,6 +76,7 @@ class IntegrationTest extends WebTestBase {
     $this->addFieldsToIndex();
     $this->checkDataTypesTable();
     $this->removeFieldsFromIndex();
+    $this->checkReferenceFieldsNonBaseFields();
 
     $this->configureFilter();
     $this->configureFilterPage();
@@ -819,6 +820,35 @@ class IntegrationTest extends WebTestBase {
   }
 
   /**
+   * Tests if non-base fields of reference fields are displayed in Add fields.
+   */
+  protected function checkReferenceFieldsNonBaseFields() {
+    // Add a entity_reference field.
+    $field_label = 'reference_field';
+    $edit = array(
+      'new_storage_type' => 'entity_reference',
+      'label' => $field_label,
+      'field_name' => '_reference_field_',
+    );
+    $this->drupalGet('admin/structure/types/manage/_content_/fields/add-field');
+    $this->assertResponse(200);
+    $this->drupalPostForm(NULL, $edit, $this->t('Save and continue'));
+    $this->drupalPostForm(NULL, ['cardinality' => -1], $this->t('Save field settings'));
+
+    $url_options['query']['datasource'] = 'entity:node';
+    $this->drupalGet($this->getIndexPath('fields/add'), $url_options);
+
+    $link = $this->xpath('//*[@id="edit-expand-link--7"]')[0];
+    $this->drupalGet($this->getAbsoluteUrl($link[0]['href']));
+
+    $link = $this->xpath('//*[@id="edit-expand-link--8"]')[0];
+    $this->drupalGet($this->getAbsoluteUrl($link[0]['href']));
+
+    // Check if the field is displayed to be indexed.
+    $this->assertRaw('name="entity:node/field__reference_field_:entity:field__reference_field_"');
+  }
+
+  /**
    * Tests that configuring a processor works.
    */
   protected function configureFilter() {
diff --git a/src/Utility.php b/src/Utility.php
index edf43a3..24493a1 100644
--- a/src/Utility.php
+++ b/src/Utility.php
@@ -5,6 +5,7 @@ namespace Drupal\search_api;
 use Drupal\Component\Render\FormattableMarkup;
 use Drupal\Core\Config\ConfigImporter;
 use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface;
 use Drupal\Core\TypedData\ComplexDataDefinitionInterface;
 use Drupal\Core\TypedData\ComplexDataInterface;
 use Drupal\Core\TypedData\DataDefinitionInterface;
@@ -753,4 +754,28 @@ class Utility {
     return static::splitPropertyPath($combined_id, TRUE, IndexInterface::DATASOURCE_ID_SEPARATOR);
   }
 
+  /**
+   * Get nested properties.
+   *
+   * If we have bundles, we have to arrive up to the fields that are in the
+   * bundle.
+   *
+   * @param \Drupal\Core\TypedData\DataDefinitionInterface[] $property
+   *   The base definition.
+   *
+   * @return \Drupal\Core\Field\FieldDefinitionInterface[]
+   *   The nested properties and fields of the entity.
+   */
+  public static function getNestedProperties($property) {
+    $nested_properties = $property->getPropertyDefinitions();
+    if ($property instanceof EntityDataDefinitionInterface) {
+      $bundles = \Drupal::entityManager()->getBundleInfo($property->getEntityTypeId());
+      foreach ($bundles as $bundle => $bundle_label) {
+        $bundle_properties = \Drupal::entityManager()->getFieldDefinitions($property->getEntityTypeId(), $bundle);
+        $nested_properties += $bundle_properties;
+      }
+    }
+    return $nested_properties;
+  }
+
 }
