Hello,
I'm using PHP Pecl to create my index, and am getting an error that I can't figure out. I've pared my code down to the below. I've verified that the database query is pulling in data correctly, and the $solrDocs array has the expected number of items, but I'm getting an error thrown by the addDocuments method.

Here is my code:

   $lastUpdate = '2013-09-31';
   $prod_result = $db_connect->query("
SELECT DISTINCT p.id, p.prodName, p.brand, bi.brandName, p.description, p.lastUpdate
       FROM product_CJ p
       INNER JOIN brands_inactive bi ON bi.feedID = p.brand
       WHERE p.showProd='Y' AND p.lastUpdate > ? LIMIT 0, 1",
       array($lastUpdate)
   );

   $docArray = array();
   while ($prod_row = $prod_result->fetchRow(DB_FETCHMODE_ASSOC)) {
       $docArray[$prod_row['id']] = $prod_row;
   }

   $solrDocs = array();
   foreach ($docArray AS $prod_row) {
         $tmpProdID = $prod_row['id'];
         $doc = new SolrInputDocument();
         $doc->addField('id', $tmpProdID);
         $doc->addField('prodName', $prod_row['prodName']);
         $doc->addField('brand', $prod_row['brand']);
         $doc->addField('brandName', $prod_row['brandName']);
         $doc->addField('description', $prod_row['description']);
         $tmpUpdate = $prod_row['lastUpdate']."T00:00:00Z";
         $doc->addField('lastUpdate', $tmpUpdate);
         $solrDocs[] = $doc;
   }

   foreach (array_chunk($solrDocs, 500) AS $solrChunk) {
        $client->addDocuments($solrChunk);
   }


and the error is "Filter execution threw an exception"

Does anyone know what this error might mean?
Thanks,
Brian

Reply via email to