Configuration of the SOLR DataImport
1) Increase in Solrconfig.xml
<!--new additions to Configuration-->
<requesthandler name= "/dataimport" class= "Org.apache.solr.handler.dataimport.DataImportHandler" >
<lst name= "Defaults" >
<str name= "config" >data-config.xml</str>
</lst>
</requestHandler>
2) then add the Data-config.xml file under the same directory of Solrconfig.xml, that is, the SOLR home directory
<dataConfig>
<datasource driver= "Com.mysql.jdbc.Driver" url= "Jdbc:mysql://localhost:3306/test" user= "root" password= "123456" />
<document name= "Moviedoc" >
<entity name= "movie" transformer= "Regextransformer,datatointtransformer" query= "select * from Movie" >
<field column= "Actors" splitby= "," sourcecolname= "Actors"/>
<field column= "director" splitby= "," Sourcecolname= "director"/>
<entity name= "Type" query= "SELECT ID as tid from movie_type where mid=" movie.mid′ "><fieldname=" tid "column=" tid "/></entity><entityname=" language "query=" selectidaslidfrommovielanguagewheremid=′movie.mid′ "> <fieldname= "Tid" column= "tid"/></entity><entityname= "language" query= " Selectidaslidfrommovielanguagewheremid=′{movie.mid} ' ">
<field name= "lid" column= "lid"/>
</entity>
<entity name= "zone" query= "SELECT ID as Zid from movie_zone where mid= ' m