Hi,
I have installed solr 1.4 and am trying to use the Data Import Handler to
import data from a database. I have 2 tables which share a 1 to many
relation (1 Story to Many Images).
I want my index to contain attributes regarding “Story” and also all
“Images” that it has. Based on the DIH documentation, I have setup the
data-config.xml as follows:
<document>
<entity name=*"story"*
query=*"select story_id, user_id, time, attach from story"
*
deltaImportQuery=*"select story_id, user_id, time, attach
from story where time > '${dataimporter.last_index_time}'"*
deltaQuery=*"select story_id from story where time >
'${dataimporter.last_index_time}'"*>
<entity name=*"image"*
query=*"select filename, filepath, type from images
where story_id='${story.story_id}'"*
parentDeltaQuery=*"select story_id from story where
story_id=${image.story_id}"*>
</entity>
</entity>
</document>
However, when I query the index, I find that it imports only the first
record from images that it finds for a story. Eg. If I have a story with 3
images, the index only has information about the first one. Is it possible
to get the data for all images for a story in the same index. If so, what am
I missing in the data config ?
Thanks.