Skip to content

Commit 5bf10aa

Browse files
Aurélien FOUCRETromainruaud
authored andcommitted
Fixing issue where boolean translations were not taken into account when indexing. Now indexing the attribute store label instead of Yes for booleans, this enhances fulltext relevancy on them.
1 parent 2d60244 commit 5bf10aa

File tree

1 file changed

+5
-7
lines changed
  • src/app/code/community/Smile/ElasticSearch/Model/Resource/Engine/Elasticsearch/Mapping/Catalog/Eav

1 file changed

+5
-7
lines changed

src/app/code/community/Smile/ElasticSearch/Model/Resource/Engine/Elasticsearch/Mapping/Catalog/Eav/Abstract.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -612,14 +612,12 @@ protected function _getAllOptionsText($attribute, $storeId)
612612
if (($attribute->getFrontendInput() == "boolean")
613613
&& ($attribute->getSourceModel() == 'eav/entity_attribute_source_boolean')
614614
) {
615-
$appEmulation = Mage::getSingleton('core/app_emulation');
616-
$initialEnvironment = $appEmulation->startEnvironmentEmulation(
617-
$storeId,
618-
Mage_Core_Model_App_Area::AREA_FRONTEND,
619-
true
615+
$allOptions = array(
616+
array(
617+
'value' => Mage_Eav_Model_Entity_Attribute_Source_Boolean::VALUE_YES,
618+
'label' => $attribute->getStoreLabel($storeId)
619+
)
620620
);
621-
$allOptions = Mage::getModel($attribute->getSourceModel())->getAllOptions(false);
622-
$appEmulation->stopEnvironmentEmulation($initialEnvironment);
623621
} else {
624622
$allOptions = $attribute->getSource()->getAllOptions(false);
625623
}

0 commit comments

Comments
 (0)