Just starting with DataImportHandler and had a few simple questions.

Is there a location for more in depth documentation other than
http://wiki.apache.org/solr/DataImportHandler?

Specifically I was looking for a detailed document outlining
data-config.xml, the fields and attributes and how they are used.

* Is there a way to dynamically generate field elements from the
supplied sql statement?

Example: Suppose one has a table of 100 fields. Entering this manually
for each field is not very efficient.

ie, if table has only 3 columns this is easy enough...

<entity name="item" query="select * from item">
            <field column="ID" name="id" />
            <field column="NAME" name="name" />
            <field column="MANU" name="manu" />
<entity>

What are the options if ITEM table has dozens or hundreds?


* Is there a way to apply insert logic based on the value of the incoming field?

My specific use case would be, if the incoming value is null, do not
add to Solr.

ie Record is :
ID : 50
NAME : Blahblah
MANU : null

<entity name="item" query="select * from item">
            <field column="ID" name="id" />
            <field column="NAME" name="name" />
            <field column="MANU" name="manu" />
<entity>

Using the following in data-config.xml is there are way to ignore null
fields altogether? I see some special commands listed such as
$skipRecord, is there some type of $skipField operation?

Thanks

Reply via email to