Hello list,

I've been successful with DIH to a large extent but a seemingly simple extra 
column I need is posing problems. In a nutshell I have 2 entities let's say - 
Listing habtm Contact. I have copied the relevant parts of the configs below.

I have run my SQL for the sub-entity Contact and this is produces correct 
results. No errors are given by Solr on running the import. Yet no records are 
being set with the contacts array.

I have taken out my sub-entity config and replaced it with a simple template 
value just to check and values then come through OK.

So it certainly seems limited to my query or query config somehow. I followed 
roughly the example of the DIH bundled example.

DIH.xml
=======

<entity name="listing" ...>
  ...
  <entity name="contacts"
query="select concat(c.first_name, concat(' ', c.last_name)) as full_name from 
contacts c inner join listing_contacts lc on c.id = lc.contact_id where 
lc.listing_id = '${listing.id}'">
<field name="contacts" column="full_name" />
</entity>

SCHEMA.XML

<field name="contacts" type="text" indexed="true" stored="true" 
multiValued="true" required="false" />


Any tips appreciated.

Reply via email to