> i got a new problem. we put out item's table into antother > database and now > i need to use multiple datascource but without successed > =( > > so.. here my data-config-xml in short ;) > > <dataSource name="shops" type="JdbcDataSource" ... > /> > <entity name="active" pk="id" dataSource="shops" > query="select id FROM shops WHERE is_active=1" /> > > <dataSource name="items" type="JdbcDataSource" ... > /> > <entity name="item" pk="id" dataSource="items" > processor="org.apache.solr.handler.dataimport.CachedSqlEntityProcessor" > query="select i.id, i.shop_id, > i.name, > from shop_items as i WHERE > i.shop_id='{shops.active.id}'" .... some > delta imports ... and categroy mappings. > > so, i want only to index these items where is_active=1 in > the table shops. > how can i perform this ? > > thhhxxx =)
Datasourse definitions should be in the beginning right after the <dataConfig> and '{shops.active.id}' should be '{active.id}' <dataSource name="shops" type="JdbcDataSource" ... /> <dataSource name="items" type="JdbcDataSource" ... /> <entity name="active" pk="id" dataSource="shops" query="select id FROM shops WHERE is_active=1" /> <entity name="item" pk="id" dataSource="items" processor="org.apache.solr.handler.dataimport.CachedSqlEntityProcessor" query="select i.id, i.shop_id, i.name, from shop_items as i WHERE i.shop_id='{active.id}'" .... some delta imports ... and categroy mappings.