lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu shen <shenyu...@gmail.com>
Subject DataImportHanlder - Multiple entities will step into each other
Date Tue, 04 Jan 2011 13:23:18 GMT
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