You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by vsriram30 <vs...@gmail.com> on 2016/01/28 23:43:45 UTC

Mysql data import issue

Hi,
I am using Solr 4.6.1 and I am trying to import my data from mysql to solr.

In mysql, I have a table with columns,
id, legacyid, otherfields...

In solr I have columns : id, other fields. I want to map the legacyid field
in my mysql table with Solr'r id column and skip the "id" field of mysql
while doing import. Hence I have a mapping,
<field column="legacyid" name="id"/>

But still I get one to one mapping of my mysql id field to solr's id field.
Can you please let me know how to prevent this from happening?

I even mapped id field of mysql to empty solr field. <field column="id"
name=""/>

But still I get mysql id field to solr id field mapping. Please let me know
how to prevent this from happening. 

Thanks,
Sriram



--
View this message in context: http://lucene.472066.n3.nabble.com/Mysql-data-import-issue-tp4253998.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Mysql data import issue

Posted by vsriram30 <vs...@gmail.com>.
Thanks Gora for your Suggestions. Since my table contains lot of fields, and
all the other fields have same name mapping for solr and mysql, I thought I
can give mapping for the one which is different and leave remaining as is.
But is not selecting the id field in the returned query the only way to
achieve that?

Thanks,
Sriram



--
View this message in context: http://lucene.472066.n3.nabble.com/Mysql-data-import-issue-tp4253998p4254210.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Mysql data import issue

Posted by Gora Mohanty <go...@mimirtech.com>.
On 29 January 2016 at 04:13, vsriram30 <vs...@gmail.com> wrote:

> Hi,
> I am using Solr 4.6.1 and I am trying to import my data from mysql to solr.
>
> In mysql, I have a table with columns,
> id, legacyid, otherfields...
>
[...]

> But still I get mysql id field to solr id field mapping. Please let me know
> how to prevent this from happening.
>

How about if you do not select the mysql "id" field in the query attribute
for the entity?

Regards,
Gora