Skip to content

Commit

Permalink
Smile ElasticSearch - Fix bug on query creation - Current Store to de…
Browse files Browse the repository at this point in the history
…tect language was always used. Now collection store id is enforced
  • Loading branch information
Aurélien FOUCRET committed Feb 12, 2015
1 parent 62f65fe commit 1c15ae5
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,6 @@ class Smile_ElasticSearch_Model_Resource_Catalog_Product_Collection extends Mage
*/
protected $_sortBy = array();


/**
* Add some fields to filter.
*
* @param array $fields Field to be filtered and filter values
*
* @return Smile_ElasticSearch_Model_Resource_Catalog_Product_Collection
*/
public function addFieldsToFilter($fields)
{
return $this;
}

/**
* Stores query text filter.
*
Expand Down Expand Up @@ -211,7 +198,7 @@ public function getSearchEngineQuery()
$this->_searchEngineQuery = $this->_engine->createQuery('product');

if ($this->getStoreId()) {
$store = Mage::app()->getStore();
$store = Mage::app()->getStore($this->getStoreId());
$this->_searchEngineQuery->setLanguageCode(Mage::helper('smile_elasticsearch')->getLanguageCodeByStore($store));
}
}
Expand Down

0 comments on commit 1c15ae5

Please sign in to comment.