Hi Con, In our project, we found it useful to construct a pseudo uniquekey based on the rowtype and row uniqueid, ie
<entity name="user" transformer="TemplateTransformer" query="select * from USER"> <field column="rowtype" template="user" /> <field column="id" template="user${user.uniqueid}" /> </entity> > -----Original Message----- > From: con [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 8 October 2008 6:47 PM > To: solr-user@lucene.apache.org > Subject: Problem in using Unique key > > > hi guys > I am indexing values from an oracle db and them performing searching. > Since I have to search multiple tables, that is no way related to each > other, I have changed the uniquekey constraint in schema.xml to false. > <uniqueKey required="false">userID</uniqueKey> > But when I do indexing, the values from the table that does not have > the > column USERID is not getting indexed, > > WARNING: Error creating document : > SolrInputDocumnt[{rowtype=rowtype(1.0)={role} > , INVOICEID=INVOICEID(1.0)[EMAIL PROTECTED], RATE=RATE(1.0)={1000}}] > org.apache.solr.common.SolrException: Document [null] missing required > field: USERID > at > org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java: > 289) > at > org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdat > eProcessorFactory.java:58) > at > org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:69 > ) > at > org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImpor > tHandler.java:288) > at > org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder. > java:319) > at > org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.jav > a:178) > at > org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:1 > 36) > at > org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImport > er.java:334) > at > org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.jav > a:386) > at > org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java > :377) > 8 Oct, 2008 12:54:48 PM > org.apache.solr.handler.dataimport.JdbcDataSource$1 > call > > Is there something I missed or done anything wrong. > > thanks in advance. > > con > -- > View this message in context: http://www.nabble.com/Problem-in-using- > Unique-key-tp19873980p19873980.html > Sent from the Solr - User mailing list archive at Nabble.com.