Well,

I thought the "<span style="font-family: Trebuchet MS, sans-serif;">"
and the ending span were broken email thing but they seem to be in the
solrconfig.xml file as well. I would start from removing those and
leaving just the actual definition.

Regards,
   Alex.
Personal: http://www.outerthoughts.com/ and @arafalov
Solr resources and newsletter: http://www.solr-start.com/ and @solrstart
Solr popularizers community: https://www.linkedin.com/groups?gid=6713853


On 2 November 2014 20:50, Tim Dunphy <bluethu...@gmail.com> wrote:
>
> Hey guys,
>
>  I'm real new at working with Solr. But I need to get up to speed and I
> appreciate your bearing with me.
>
>  I've installed solr 4 and am running it under tomcat 7. The install went
> perfectly fine and everything seems to work, up to a point. I've even
> automated the installation with puppet which gets everything up and running
> perfectly as well.
>
>  However my problem is that I need to be able to import some data from a
> mysql database.
>
>  I've followed this tutorial to try and do this:
>
>
> http://www.beingjavaguys.com/2013/01/how-to-use-solr-data-import-handler-to.html
>
>
> I've added a file called data-config.xml to the following location under my
> solr root:
>
> [root@solr1:/opt/solr/collection1/conf] #cat data-config.xml
>
>  <span style="font-family: Trebuchet MS, sans-serif;"><dataConfig>
>
>      <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"
> url="jdbc:mysql://web1.mydomain.com:3306/mydomain" user="admin"
> password=“secret” batchSize="1" />
>
>        <document name="mydomain_users">
>
>         <entity name="mydomain_users" query="SELECT * FROM players_data">
>
>             <field column="ID" name="ID" />
>
>             <field column="user_login" name="user_login" />
>
>             <field column="user_nicename" name="user_nicename" />
>
>            <field column="user_email" name="user_email" />
>
>            <field column="user_url" name="user_url" />
>
>            <field column="user_registered" name="user_registered" />
>
>            <field column="user_activation_key" name="user_activation_key" />
>
>            <field column="user_status" name="user_status" />
>
>            <field column="display_name" name="display_name" />
>
>        </entity>
>
>        </document>
>
>    </dataConfig>
>
> </span>
>
> And added the following section to my
> /opt/solr/collection1/conf/solrconfig.xml
>
>   <span style="font-family: Trebuchet MS, sans-serif;"><requestHandler
> name="/dataimport"
> class="org.apache.solr.handler.dataimport.DataImportHandler">
>
>          <lst name="defaults">
>
>            <str name="config">data-config.xml</str>
>
>        </lst>
>
>     </requestHandler>
>
>    </span>
>
> Then restart tomcat. I then navigate to collection1 -> data import in the
> solr admin interface and see the following response:
>
> sorry, no dataimport-handler defined!
>
> I am ok with parsing XML with my eyes. I've worked in some big environments,
> where I've had to read it until my eyes bled! hah.. but I am not sure if I
> am placing the section in solrconfig.xml that it needs to be. I'm probably
> missing something obvious since I'm so new at using solr. I'm hoping someone
> with more experience can point me in the right direction.
>
> I'm enclosing my solrconfig.xml files and data-config.xml in case someone
> wants to get a sense of the context that I'm working with.
>
> Thanks!
>
> --
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>

Reply via email to