Re: Garbled data in response - reading from mySQL database
In general it is easier to use the DIH with a database view, rather than embedding the query in the DIH configuration file. On Sat, Oct 3, 2009 at 2:08 AM, Ade B wrote: > > Perfect, thank you. > > Ade > > > > -- > View this message in context: > http://www.nabble.com/Garbled-data-in-response---reading-from-mySQL-database-tp25726655p25726976.html > Sent from the Solr - User mailing list archive at Nabble.com. > > -- Lance Norskog goks...@gmail.com
Re: Garbled data in response - reading from mySQL database
Perfect, thank you. Ade -- View this message in context: http://www.nabble.com/Garbled-data-in-response---reading-from-mySQL-database-tp25726655p25726976.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Garbled data in response - reading from mySQL database
Change concat(i.name,'|',ih.name,'|',i.id) to *cast(*concat(i.name,'|', ih.name,'|',i.id)* as char)* Cheers Avlesh On Sat, Oct 3, 2009 at 1:51 PM, Ade B wrote: > > Hi > > I am using the DIH to import data from a mySQL database. Everything was > fine > in that I could index the data, and search the index and return the correct > results. However, I have just changed my database-config.xml file to add > the > primary key value of a table to a field composed of other values. For > example in the entity definition below from the database-config.xml file, I > have added changed > > concat(i.name,'|',ih.name) to concat(i.name,'|',ih.name,'|',i.id). > > > deltaQuery="select ih.recipe_id from ingredientheader ih, > ingredient i > where ih.lastModified > '${dataimporter.last_index_time}' or i.lastModified > > '${dataimporter.last_index_time}'" >parentDeltaQuery="select id from recipe where id = > '${ingredientheader.recipe_id}'"> > > > > > > The query runs correctly in MySQL and returns the correct data. I can still > index the data without error, but the response now contains garbage for > these fields. > > Example snippet of response is: > > > [...@1f759bf > > - > > [...@2513d0 > > - > > [...@1a82c58 > > > Note: I am using a nightly build of Solr 1.4 from 26/9/2009. > > Any ideas? > > Thanks > Ade > > -- > View this message in context: > http://www.nabble.com/Garbled-data-in-response---reading-from-mySQL-database-tp25726655p25726655.html > Sent from the Solr - User mailing list archive at Nabble.com. > >
Garbled data in response - reading from mySQL database
Hi I am using the DIH to import data from a mySQL database. Everything was fine in that I could index the data, and search the index and return the correct results. However, I have just changed my database-config.xml file to add the primary key value of a table to a field composed of other values. For example in the entity definition below from the database-config.xml file, I have added changed concat(i.name,'|',ih.name) to concat(i.name,'|',ih.name,'|',i.id). The query runs correctly in MySQL and returns the correct data. I can still index the data without error, but the response now contains garbage for these fields. Example snippet of response is: [...@1f759bf − [...@2513d0 − [...@1a82c58 Note: I am using a nightly build of Solr 1.4 from 26/9/2009. Any ideas? Thanks Ade -- View this message in context: http://www.nabble.com/Garbled-data-in-response---reading-from-mySQL-database-tp25726655p25726655.html Sent from the Solr - User mailing list archive at Nabble.com.