lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu shen <shenyu...@gmail.com>
Subject Re: DataImportHanlder - Multiple entities will step into each other
Date Tue, 04 Jan 2011 13:59:33 GMT
Thanks for the prompt reply. Let me try. Delete is not a big deal for the
moment.

2011/1/4 Matti Oinas <matti.oinas@gmail.com>

> I managed to do that by using TemplateTransformer
>
> <document>
>  <entity name="company"..... transformer="TemplateTransformer">
>     <field column="id" name="id" template="company-${company.id}" />
> ...
>  <entity name="item"..... transformer="TemplateTransformer">
>     <field column="id" name="id" template="item-${item.id}" />
> ...
> </document>
>
> Only problem is that delta import fails to perform delete to the
> index. It seems that TemplateTransformer is not used when performing
> delete so delete by id doesn't work.
>
>
>
> 2011/1/4 yu shen <shenyu.sh@gmail.com>:
> > Hi All,
> >
> > I have a dataimporthandler config file as below. It contains multiple
> > entities:
> > <dataConfig>
> >        <dataSource name="jdbc" driver="com.mysql.jdbc.Driver"
> >
> >
> url="jdbc:mysql://localhost:1521/changan?useUnicode=true&amp;characterEncoding=utf8&amp;autoReconnect=true"...
> > />
> >        <document>
> >                <entity name="item" dataSource="jdbc" pk="id" query="...">
> >                <entity name="company" dataSource="jdbc" pk="id" query="">
> >                ....
> >        </document>
> > </dataConfig>
> >
> > All data are from a database. Problem is item/company and other entity
> all
> > have the field 'id', with value start from 1 to n. In this case,
> > item/company etc. will step into each other.
> > Is there a way to prevent is from happening. Such as designate different
> > entity to different partition.
> >
> > One way I can think of is to seperate different entity to different
> > instance, which is not ideal solution IMO.
> >
> > Would some one point me to a reference? And also give some instructions?
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message