Hi,

My english is bad. But I try to explain do this.

I have a 5 table in MySQL db. I try make data-config.xml. Then my
data-config.xml is below.

<dataConfig>
         <dataSource type="JdbcDataSource" 
                          name="ds-1"
              driver="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost/testdb" 
              user="root" 
              password="*******"/>
          <document>
            <entity name="admin" query="select *from admin" dataSource="ds-1">
                        <field column="id" name="id" />
                        <field column="name" name="name" />
                        <field column="mail" name="mail" />
                </entity>
                
                <entity name="checklist" query="select *from checklist" 
dataSource="ds-1">
                        <field column="check_id" name="check_id" />
                        <field column="title" name="title" />
                        <field column="connect" name="connect" />
                </entity>
                
                <entity name="account" query="select *from account" 
dataSource="ds-1">
                        <field column="account_id" name="account_id" />
                        <field column="name" name="name" />
                        <field column="code" name="code" />
                </entity>
        </document>     
</dataConfig>

Then I register schema.xml to these fields. But I have a unique key problem?

default is uniquekey=>id. But my 5 table unique keys are check_id,
account_id, store_id etc. All unique keys are auto increment. 

I have tried indexed. But unfortunately this error appeared.

May 10, 2013 6:18:22 PM org.apache.solr.handler.dataimport.SolrWriter upload
WARNING: Error creating document : SolrInputDocument[group_name=Other,
group_id=5]
org.apache.solr.common.SolrException: *DOCUMENT IS MISSING MANDATORY
UNIQUEKEY FIELD: ID*
        at
org.apache.solr.update.AddUpdateCommand.getIndexedId(AddUpdateCommand.java:88)

- How can I index these tables?

- Please assist me on this. 




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Multitable-import-uniqueKey-tp4067796p4068050.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to