Hey all,

 I finally got mysql data into Solr 4 with your help. First off, thank you
for that!

 But now I'm hoping to refine the resulting process a bit.

 What I'm trying to do, now that mysql imports are working, is to import 2
separate tables from the same mysql database. I tried this in my xml and it
doesn't work:

<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 wp_users">
            <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>

    <document name="mydomain_posts">
        <entity name="mydomain_posts" query="SELECT * FROM wp_posts">
            <field column="ID" name="ID" />
            <field column="post_author" name="post_author" />
            <field column="post_date" name="post_date" />
            <field column="post_content" name="post_content" />
        </entity>
    </document>
</dataConfig>

What happens is that the first table (document name mydomain_users) gets
imported. But the second table (document name mydomain_posts) does not.

Can anybody tell me what I'm doing wrong? I know that I need to get a
little more used to using XML.

Thanks
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Reply via email to