Hi, If I write a query like this, is there a way I can achive the results that I need
select * from employee a left outer join qualification b on a.empid = b.empid; This will return 5 records, 1 per employee qualification. Can this be indexed as is? 1, John, MBA, A 1, John, Lead, B 2, George, MBA, B 2, George, PM, C 3, Viktor, null, null How do I put the schema so that this can be searched as is? I would not prefer to put database specific functions in my solution. On Sat, Oct 27, 2012 at 7:08 AM, Gora Mohanty <g...@mimirtech.com> wrote: > On 27 October 2012 01:20, v vijith <vvij...@gmail.com> wrote: > [...] >> The dataconfig file is >> <document> >> <entity name="employee" query="select * from employee"> >> <entity name="qualification" query="select * from >> qualification where empid='${employee.EMPID}'"/> >> </entity> >> </document> > [...] > > The SELECT in the nested entity "qualification" should fetch > all qualifications for the given employee. How to do that is > database dependent, e.g., one would use something like > group_concat() in mysql. After collecting multiple qualifications > in a single string, one can use a transformer to break the > string at the separator used in group_concat(), and populate > the desired Solr field with the pieces. > > Depending on your expertise, it might be easier to do this > through a Solr XML document, or SolrJ. > > Regards, > Gora