This seems relevant: http://stackoverflow.com/questions/16914324/solr-4-missing-required-field-uuid
Best, Erick On Thu, Apr 16, 2015 at 11:38 AM, Kaushik <kaushika...@gmail.com> wrote: > You seem to have defined the field, but not populating it in the query. Use > a combination of fields to come up with a unique id that can be assigned to > uuid. Does that make sense? > > Kaushik > > On Thu, Apr 16, 2015 at 2:25 PM, Vishal Swaroop <vishal....@gmail.com> > wrote: > >> How to generate uuid/ id (maybe in data-config.xml...) for table which do >> not have any primary key. >> >> Scenario : >> Using DIH I need to import data from database but table does not have any >> primary key >> I do have uuid defined in schema.xml and is >> <field name="uuid" type="uuid" indexed="true" stored="true" required="true" >> multiValued="false"/> >> <uniqueKey>uuid</uniqueKey> >> >> data-config.xml >> <?xml version="1.0" encoding="UTF-8" ?> >> <dataConfig> >> <dataSource >> batchSize="2000" >> name="test" >> type="JdbcDataSource" >> driver="oracle.jdbc.OracleDriver" >> url="jdbc:oracle:thin:@ldap:...." >> user="myUser" >> password="pwd"/> >> <document> >> <entity name="test_entity" >> docRoot="true" >> dataSource="test" >> query="select name, age from test_user"> >> </entity> >> </document> >> </dataConfig> >> >> Error : Document is missing mandatory uniqueKey field: uuid >>