Ah, my bad. I was incorrect - it was not actually indexing. @Jon - is there a possibility that your url_type is NULL, but not empty? Your if check only checks to see if it is empty, which is not the same as checking to see if it is null. If it is null, that's why you'd be having those errors - null values are just not accepted, it seems.
Swati -----Original Message----- From: Swati Swoboda [mailto:sswob...@igloosoftware.com] Sent: Thursday, August 09, 2012 11:09 PM To: solr-user@lucene.apache.org Subject: RE: DataImportHandler WARNING: Unable to resolve variable I am getting a similar issue when while using a Template Transformer. My fields *always* have a value as well - it is getting indexed correctly. Furthermore, the number of warnings I get seems arbitrary. I imported one document (debug mode) and I got roughly ~400 of those warning messages for the single field. -----Original Message----- From: Jon Drukman [mailto:jdruk...@gmail.com] Sent: Thursday, August 09, 2012 2:38 PM To: solr-user@lucene.apache.org Subject: DataImportHandler WARNING: Unable to resolve variable I'm trying to use DataImportHandler's delta-import functionality but I'm getting loads of these every time it runs: WARNING: Unable to resolve variable: article.url_type while parsing expression: article:${article.url_type}:${article.id} The definition looks like: <entity name="article" query="... irrelevant ..." deltaQuery="select id,'dummy' as type_id FROM articles WHERE (post_date > '${dataimporter.last_index_time}' OR updated_date > '${dataimporter.last_index_time}') AND post_date <= NOW() AND status = 9" deltaImportQuery="select id, article_seo_title, DATE_FORMAT(post_date,'%Y-%m-%dT%H:%i:%sZ') post_date, subject, body, IF(url_type='', 'article', url_type) url_type, featured_image_url from articles WHERE id = ${dataimporter.delta.id}" transformer="TemplateTransformer,HTMLStripTransformer"> <field column="id" name="id" /> <field column="post_date" name="post_date" /> <field column="subject" name="title" /> <field column="body" name="subhead" stripHTML="true" /> <field column="type_id" template="article:${article.url_type}:${ article.id}" /> <field column="type" template="2" /> <field column="featured_image_url" name="main_image" /> <field column="article_seo_title" name="seo_title" /> </entity> As you can see, I am always making sure that article.url_type has some value. Why am I getting the warning? -jsd-