I'm guessing that "id" in your schema.xml is also a unique key field.
If so, each document must have an id field or Solr will refuse to
index them.

DataImportHandler will map the id field in your table to Solr schema's
id field only if you have not specified a mapping.

On Thu, Jan 23, 2014 at 3:01 AM, tom <praveen...@yahoo.com> wrote:
> Hi,
> I am trying to use dataimporthandler(Solr 4.6) from oracle database, but I
> have some issues in mapping the data.
> I have 3 columns in the test_table,
>  column1,
>  column2,
>  id
>
> dataconfig.xml
>
>       <entity name="test_table"
>                                 query="select * from test_table" >
>                         <field column="column1" name="id" />
>                         <field column="column2" name="name" />
>         </entity>
>
> Issue is,
> - if I remove the id column from the table, index fails, solr is looking for
> id column even though it is not mapped in dataconfig.xml.
> - if I add, it directly maps the id column form the db to solr id, it
> ignores the column1, even though it is mapped.
>
> my problem is I don't have ID in every table, I should be able to map the
> column I choose from the table to solr Id,  any solution will be greatly
> appreciated.
>
> `Tom
>
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/dataimport-handler-tp4112830.html
> Sent from the Solr - User mailing list archive at Nabble.com.



-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to