1) Yes, its the JDBC connection URL/URI. You can use a JNDI preconfigured
datasource instead. It's all here
http://wiki.apache.org/solr/DataImportHandler

2) It's a mapping: column is the database column and name is your solr
destination field. You only need to specify name when both differ.

DIH looks like a 7-headed dragon first time you see it, but by the end of
the day you'll love it.



alexei martchenko
Facebook <http://www.facebook.com/alexeiramone> |
Linkedin<http://br.linkedin.com/in/alexeimartchenko>|
Steam <http://steamcommunity.com/id/alexeiramone/> |
4sq<https://pt.foursquare.com/alexeiramone>| Skype: alexeiramone |
Github <https://github.com/alexeiramone> | (11) 9 7613.0966 |


2014-02-04 rachun <rachun.c...@gmail.com>:

> please see below code..
>
> <dataConfig>
>   <dataSource type="JdbcDataSource"
>               driver="com.mysql.jdbc.Driver"
>               url="jdbc:mysql://localhost:3306/mydb01"
>               user="root"
>               password=""/>
>   <document>
>     <entity name="users" query="select id,firstname,username from users">
>         <field column="id" name="user_id" />
>         <field column="firstname" name="user_firstname" />
>     </entity>
>   </document>
> </dataConfig>
>
> my question is..
> 1. what is the url for?  (url="jdbc:mysql://localhost:3306/mydb01" )
> does it means my database url?
>
> 2. did i do it right with this
> <field column="id" name="user_id" />
> i'm not sure name means the field in Solr?
>
>
> Thank you very much,
> Chun.
>
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Import-data-from-mysql-to-sold-tp4114982p4115191.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to