Thanks, this helps a great deal, and I may be able to use this method.

Is this how DIH is intended to be used? The multi values should be returned
in 1 row then manipulated by a transformer? This is fine, but is just
unclear from the documentation. I was under the assumption that multiple
rows returned for a child entity with the same parent would be able to
create a multivalued entry.

>From the DataImportHandler wiki:

"...it is possible to create a multivalued field by joining an entity with
another.i.e if the sub-entity returns multiple rows for one row from parent
entity it can go into a multivalued field"





  For multiple value fields using the DIH, i use group_concat with the 
regextransformer's splitby:
ex:
<entity dataSource="grad_schools" query="
           SELECT    group_concat(professors.name separator '|') as 
university_professors
           FROM professors
             WHERE     professors.university_guid = '${universities.guid}'
         "
         transformer="RegexTransformer">
<field column="university_professors" splitBy="\|" />
</entity>

hope that's helpful.

@tommychheng
Programmer and UC Irvine Graduate Student
Find a great grad school based on research interests:
http://gradschoolnow.com


On 8/6/10 4:39 PM, harrysmith wrote:
> I'm having a difficult time understanding how multivariable fields work
> with
> the DataImportHandler when the source is a RDBMS. I've read the following
> from the wiki:
>

-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/DIH-and-multivariable-fields-problems-tp1032893p1033045.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to