On 4 February 2014 15:28, rachun <rachun.c...@gmail.com> wrote:
> 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..

Please check the URL that you were referred to:
http://wiki.apache.org/solr/DataImportHandler

> 1. what is the url for?  (url="jdbc:mysql://localhost:3306/mydb01" )
> does it means my database url?

It is the JDBC URL: Please see
http://wiki.apache.org/solr/DataImportHandler#Configuring_JdbcDataSource

> 2. did i do it right with this
> <field column="id" name="user_id" />
> i'm not sure name means the field in Solr?

Yes, the "column" is the database column name, and "name"
the Solr field name that must be defined in schema.xml.

Regards,
Gora

Reply via email to