lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ade B <>
Subject Garbled data in response - reading from mySQL database
Date Sat, 03 Oct 2009 08:21:43 GMT


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(,'|', to concat(,'|',,'|',

<entity name="ingredient" query="select concat(,'|',,'|',
as name, concat(i.quantity,'|',,'|', as quantity,
concat(i.unit,'|',,'|', as unit from ingredientheader ih,
ingredient i where = i.ingredientHeader_id and
		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 =
    		<field name="ingredientName" column="name"/>
    		<field name="ingredientUnit" column="unit"/>
    		<field name="ingredientQuantity" column="quantity"/>

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:

<arr name="ingredientName">
<arr name="ingredientQuantity">
<arr name="ingredientUnit">

Note: I am using a nightly build of Solr 1.4 from 26/9/2009.

Any ideas?


View this message in context:
Sent from the Solr - User mailing list archive at

View raw message