lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit Nithian <anith...@gmail.com>
Subject Re: DIH and multivariable fields problems
Date Sat, 07 Aug 2010 01:05:09 GMT
That's probably the most efficient way to do it... I believe the line you
are referring allows you to have sub-entities which , in the RDBMS, would
execute a separate query for each parent given a primary key. The downside
to this though is that for each parent you will be executing N separate
queries.

I tend to like forcing all my logic in SQL and using transformers to process
each row for your DB is more efficient at the joins than the application
layer.

On Fri, Aug 6, 2010 at 5:46 PM, harrysmith <harrysmithwla@gmail.com> wrote:

>
> 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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message