Hi Adam, I made a quick review of the DIH-code in your exception and it seems like it is not possible to resolve a multi-column PK at the moment.
Maybe I am wrong, but can anyone confirm to have problems with DIH, whenever he uses a multi-column PK? Kind regards, Em Am 18.02.2012 02:52, schrieb AdamLane: > Thanks for your thoughts Shawn. I did notice 3.x tightened up alot and I did > account for it by making sure I had pk defined and columns explicitly > aliased with the same name (and I will make sure the bug text reflects > that). > > To help others that are having the same problem, I just found a thread > describing a workaround using group_concat() in mysql and then transformer > on solr. So far this appears to work and also seems to delta around 10x > faster. The only disadvantage is that the delta index process doesn't tell > you how many rows have changed. It just says 1 row because you are hacking > deltaQuery to return a single dummy row and making deltaImportQuery take in > last_index_time and return all rows that have changed. > > Quote: > > The following (MySql) query concatenates 3 lang_code fields from the main > table into one field and multiple emails from a secondary table into > another field: > SELECT u.id, > u.name, > IF((u.lang_code1 IS NULL AND u.lang_code2 IS NULL AND > u.lang_code3 IS NULL), NULL, > CONVERT(CONCAT_WS('|', u.lang_code1, u.lang_code2, > u.lang_code3) USING ascii)) AS multi_lang_codes, > GROUP_CONCAT(e.email SEPARATOR '|') AS multiple_emails > FROM users_tb u > LEFT JOIN emails_tb e ON u.id = e.id > GROUP BY u.id > > The entity in data-config.xml looks something like: > <entity name="my_entity" > query="call get_solr_full();" > transformer="RegexTransformer"> > <field name="email" column="multiple_emails" splitBy="\|" /> > <field name="lang_code" column="multiple_lang_codes" > splitBy="\|" /> > </entity> > > Full Thread: > https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201008.mbox/%3c9f8b39cb3b7c6d4594293ea29ccf438b01702...@icq-mail.icq.il.office.aol.com%3E > > So until the bug is fixed or docs are changed I hope this helps someone else > searching for this same error message. > > Adam > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/how-to-delta-index-linked-entities-in-3-5-0-tp3752455p3755453.html > Sent from the Solr - User mailing list archive at Nabble.com. >