I was trying to index some products using the below code
$engine = Mage::helper('catalogsearch')->getEngine();$engine->getCurrentIndex() ->getMapping('product') ->rebuildIndex(null, $productIds);
This code snippet didn't produce any errors. But the product was not indexed. When I logged the $ret variable in executeBulk() I got this result.
I was trying to index some products using the below code
$engine = Mage::helper('catalogsearch')->getEngine();
$engine->getCurrentIndex() ->getMapping('product') ->rebuildIndex(null, $productIds);
This code snippet didn't produce any errors. But the product was not indexed. When I logged the $ret variable in executeBulk() I got this result.Array( [took] => 6 [errors] => 1 [items] => Array ( [0] => Array ( [index] => Array ( [_index] => localhost-20180105-074301 [_type] => product [_id] => 144581|1 [status] => 400 [error] => MapperParsingException[failed to parse [cable_color]]; nested: NumberFormatException[For input string: "Black"]; ) ) ) )
So I checkedeav_attribute
table.When changed
backend_type
from text to varchar I was able to index the product.Why is this exception not shown in the frontend? I have enabled the debug mode. But I could not find it in the log either.
What could be the possible reason for this exception and why the product was added in elasticsearch after changing the
backend-type
?