Hi Sanjay,

This is how output will come since solr documents are flat.  In  your sub 
entity you queried emp name for a dept and for e.g. in case of deptno=10 you 
had 3 employees so all came in ename field.

You are getting the data, now it will be your UI function to present in 
whatever format you are looking to display.  In this case if you can maintain 
the sequence meaning, first ename {0 indice} is for first job {0 indice} you 
are good.

Thanks,
Susheel

-----Original Message-----
From: sanjay92 [mailto:sanja...@hotmail.com]
Sent: Thursday, April 03, 2014 12:30 PM
To: solr-user@lucene.apache.org
Subject: Solr DataImport Hander

Hi,
I am writing very simple Dept, Emp Solr DataImport Handler. it is working but 
when I query using http://localhost:8983/solr/select?q=*:*
I see results in XML format . See attached file.
deptemp.xml <http://lucene.472066.n3.nabble.com/file/n4128911/deptemp.xml>

Output from inner query does not correctly formatted to show : For each Dept, 
There are number of employees ( I want to show emp name and JOb) . I want to 
show first ename,Job as 1 row  but it is showing all emp name first and after 
that another column for Job.
Do I to do any changes in schema.xml for proper display ?

-------------------------------------



data-config.xml looks like this:
<dataConfig>
  <dataSource type="JdbcDataSource"
              driver="oracle.jdbc.driver.OracleDriver"
              url="jdbc:oracle:thin:@mydb:1521:SID"
              user="*****"
              password="*****"  />
  <document>
    <entity name="mydept"  query="select deptno,dname,loc from dept">
            <field column="DEPTNO" name="deptno" />
            <field column="DNAME" name="dname" />
            <field column="LOC" name="loc" />
            <entity name="myemp" query="select ename,job from emp where 
deptno=${mydept.DEPTNO} " >
               <field column="ENAME" name="ename" />
               <field column="JOB" name="job" />
            </entity>
    </entity>
  </document>
</dataConfig>




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-DataImport-Hander-tp4128911.html
Sent from the Solr - User mailing list archive at Nabble.com.
This e-mail message may contain confidential or legally privileged information 
and is intended only for the use of the intended recipient(s). Any unauthorized 
disclosure, dissemination, distribution, copying or the taking of any action in 
reliance on the information herein is prohibited. E-mails are not secure and 
cannot be guaranteed to be error free as they can be intercepted, amended, or 
contain viruses. Anyone who communicates with us by e-mail is deemed to have 
accepted these risks. Company Name is not responsible for errors or omissions 
in this message and denies any responsibility for any damage arising from the 
use of e-mail. Any opinion defamatory or deemed to be defamatory or  any 
material which could be reasonably branded to be a species of plagiarism and 
other statements contained in this message and any attachment are solely those 
of the author and do not necessarily represent those of the company.

Reply via email to