Smile-SA / smile-magento-elasticsearch

Magento ElasticSearch Implementation
151 stars 90 forks source link

Some products are not getting indexed (MapperParsingException is thrown) #130

Open jishvi opened 6 years ago

jishvi commented 6 years ago

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 checked eav_attribute table. image

When changed backend_type from text to varchar I was able to index the product.

  1. 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.

  2. What could be the possible reason for this exception and why the product was added in elasticsearch after changing thebackend-type?