Sorry - The solrJ snippet shoud read: <snip> SolrInputDocument doc = doc.addField( doc.addField( newSolrInputDocument();"id", myThing.getId() + TCSearch.SEARCH_TYPE_THING);"dbid", myThing.getId());</snip>
----- Original Message ---- From: Chris Masters <roti...@yahoo.com> To: solr-user@lucene.apache.org Sent: Tuesday, July 14, 2009 12:16:06 PM Subject: Data Import ID Problem Hi All, I have a problem when importing data using the data import handler. I import documents from multiple tables so table.id is not unique - to get round this I concatenate the type like this: <snip> <entity name="mydoc" query="select CONCAT(THING.ID,TYPE) AS INDEX_ID,THING.ID AS THING_ID,TYPE,TITLE,SUMMARY FROM THING"> <field column="INDEX_ID" name="id" /> <field column="THING_ID" name="dbid" /> </snip> When searching it seems the CONCATted string is turned into some sort of charcter array(?): <snip> <doc> <strname="dbid">1</str> <strname="id">[...@108759d</str> </snip> Everything is OK if I add a document via SolrJ: <snip> SolrInputDocument doc = doc.addField( doc.addField( newSolrInputDocument();"id", myThing.getId() + TCSearch.SEARCH_TYPE_THING);"dbid", myThing.getId()); </snip> Obviously this will cause problems as I remove documents by consturcting the ID and using deleteById. Any ideas? Thanks, rotis