TheSkyNet / magento-community-edition-solr

Automatically exported from code.google.com/p/magento-community-edition-solr
0 stars 0 forks source link

Multi-store bug #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Juste have 2 similar store, with same products
2. Check one particular search on both site
3. Only one returns correct results

What is the expected output? What do you see instead?
Same results is expected.

What version of the product are you using? On what operating system?
Mage 1.4. 

Please provide any additional information below.
The issue seems to be solved after replaced document id by : 
$storeId.'_'.$productId :

public function getProducts() {
        $products = array();
        foreach($this->_response->docs as $doc) {
            $productId = preg_replace('%^[0-9]+_([0-9]+)%i', '$1', $doc->id);
            $products[] = array('id'=>$productId,'relevance'=>$doc->score);
        }
        return $products;
    }

AND in indexer :

$document->id = $product['store_id'].'_'.$product['product_id']; 

Original issue reported on code.google.com by vincent....@gmail.com on 12 Mar 2013 at 3:56