lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gora Mohanty <>
Subject Re: SQL DIH - Can I have some guidance please?
Date Tue, 04 Dec 2012 14:16:33 GMT
On 04/12/2012, Spadez <> wrote:
> Thank you so much for your help. Based on the same schema in my first post
> and your help I created this, have I implemented it correctly based on your
> suggestion? I tried to comment it:

Looks almost correct. You only need two levels of
nesting, and can use proper nesting to differentiate
between the different "name" attributes.

  <dataSource name="app-ds" driver="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/wikipedia" user="wikipedia"
password="secret" />
          <entity dataSource="app-ds" name="item" query="SELECT id,
title, description, date, link, location_id, source_id, company_id
from item">
 			<field column="id" name="id" />
 			<field column="title" name="title" />
 			<field column="description" name="description" />			
 			<field column="date" name="date" />
 			<field column="link" name="link" />

 		        <entity dataSource="app-ds" name="location" query="SELECT
name, coordinate from location where location_id=${item.location_id}">
 			     <field column="name" name="location_name" />
 			     <field column="coordinate" name="location_coordinates" />

          	       <entity dataSource="app-ds" name="source"
query="SELECT name from source where source_id=${item.source_id}">
 			     <field column="name" name="source_name" />

 	               <entity dataSource="app-ds" name="company"
query="SELECT name from company where company_id=${item.company_id}">
 			     <field column="name" name="company_name" />
> --
> View this message in context:
> Sent from the Solr - User mailing list archive at

View raw message