diff --git a/src/Form/IndexAddFieldsForm.php b/src/Form/IndexAddFieldsForm.php
index 61f4be2..7bb6f05 100644
--- a/src/Form/IndexAddFieldsForm.php
+++ b/src/Form/IndexAddFieldsForm.php
@@ -12,6 +12,7 @@ use Drupal\Component\Utility\Html;
 use Drupal\Core\Datetime\DateFormatter;
 use Drupal\Core\Entity\EntityForm;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
+use Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface;
 use Drupal\Core\Field\TypedData\FieldItemDataDefinition;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Render\RendererInterface;
@@ -368,7 +369,16 @@ class IndexAddFieldsForm extends EntityForm {
       $parent_child_type = NULL;
       if ($property instanceof ComplexDataDefinitionInterface) {
         $can_be_indexed = FALSE;
-        $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;
+          }
+        }
+        else {
+          $nested_properties = $property->getPropertyDefinitions();
+        }
         $main_property = $property->getMainPropertyName();
         if ($main_property && isset($nested_properties[$main_property])) {
           $parent_child_type = $property->getDataType() . '.';
