/**
  * Ensure indexes from attribute.
  * Indexes will be created on the normalizedData part for attribute
  * that are usable as column and as filter and for identifier and unique attribute
  *
  * @param AttributeInterface $attribute
  */
 public function ensureIndexesFromAttribute(AttributeInterface $attribute)
 {
     $attributeFields = $this->namingUtility->getAttributeNormFields($attribute);
     switch ($attribute->getBackendType()) {
         case "prices":
             $attributeFields = $this->addFieldsFromPrices($attributeFields, $attribute);
             break;
         case "option":
         case "options":
             $attributeFields = $this->addFieldsFromOption($attributeFields, $attribute);
             break;
     }
     $this->ensureIndexes($attributeFields);
 }
 /**
  * Ensure indexes from attribute.
  * Indexes will be created on the normalizedData part for attribute
  * that are usable as column and as filter and for identifier and unique attribute
  *
  * @param AttributeInterface $attribute
  */
 public function ensureIndexesFromAttribute(AttributeInterface $attribute)
 {
     $attributeFields = $this->namingUtility->getAttributeNormFields($attribute);
     switch ($attribute->getBackendType()) {
         case AttributeTypes::BACKEND_TYPE_PRICE:
             $attributeFields = $this->addFieldsFromPrices($attributeFields);
             break;
         case AttributeTypes::BACKEND_TYPE_OPTION:
         case AttributeTypes::BACKEND_TYPE_OPTIONS:
             $attributeFields = $this->addFieldsFromOption($attributeFields);
             break;
     }
     $indexType = $this->getIndexTypeFromAttribute($attribute);
     $this->ensureIndexes($attributeFields, $indexType);
 }