Thanks for your reply! I tried your suggestion. No luck. I have verified that I have version 1.6.0_05-b13 of java installed. I am running with the nightly bits of October 7. I am pretty much out of ideas at the present time....I'd appreciate any tips/pointers.

Thanks,

- Bill

--------------------------------------------------
From: "Shalin Shekhar Mangar" <shalinman...@gmail.com>
Sent: Thursday, October 15, 2009 1:42 PM
To: <solr-user@lucene.apache.org>
Subject: Re: Using DIH's special commands....Help needed

On Fri, Oct 16, 2009 at 12:46 AM, William Pierce <evalsi...@hotmail.com>wrote:

Thanks for your help.  Here is my DIH config file....I'd appreciate any
help/pointers you may give me.  No matter what I do the documents are not
getting deleted from the index. My db has rows whose 'IndexingStatus' field
has values of either 1 (which means add it to solr), or 4 (which means
delete the document with the primary key from SOLR index).  I have two
transformers running.  Not sure what I am doing wrong.

<dataConfig>
 <script><![CDATA[
              function DeleteRow(row)    {
                  var jis = row.get('IndexingStatus');
                  var jid = row.get('Id');
                  if ( jis == 4 ) {
                       row.put('$deleteDocById', jid);
                   }
                  return row;
              }
      ]]></script>

 <dataSource type="JdbcDataSource"
            driver="com.mysql.jdbc.Driver"
            url="jdbc:mysql://localhost/db"
            user="******"
            password="*******"/>
 <document>
  <entity name="post" transformer="script:DeleteRow, RegexTransformer"
          query=" select  Id, a, b, c, IndexingStatus from  prod_table
where (IndexingStatus = 1 or IndexingStatus = 4) ">
       <field column="ptype" splitBy="," sourceColName="a" />
       <field column="wauth" splitBy=","  sourceColName="b" />
       <field column="miles" splitBy=","  sourceColName="c" />
  </entity>
 </document>
</dataConfig>


One thing I'd try is to use '4' for comparison rather than the number 4 (the
type would depend on the sql type). Also, for javascript transformers to
work, you must use JDK 6 which has javascript support. Rest looks fine to
me.

--
Regards,
Shalin Shekhar Mangar.

Reply via email to