Hello All,

We are storing nested documents in Solr and when we query we would like to
get denormalized (flattened ) view of nested object. For ex

  Stored Document :

   1. {
   2. course: "Java",
   3. room: "10",
   4. students: [
   5. {
   6. id: 12,
   7. name: "Joe"
   8. },{
   9. id: 34,
   10. name: "Jim"
   11. }
   12. ]
   13. }


Returned Document on Query.

   1. [
   2. {
   3. course: "Java",
   4. room: "10",
   5. studentId: 12,
   6. studentName: "Joe"
   7. },
   8. {
   9. course: "Java",
   10. room: "10",
   11. studentId: 34,
   12. studentName: "Jim"
   13. }
   14. ]


Looking for suggestions if we have any mechanism to achieve this already.
If not, which is the right place to customize this. I tried custom
JsonWriter and custom DocTransformer.

This use case results in creation of additional document and I am not sure
how do we add it to the result document list.

Any suggestions / best practices will be appreciated.

Thanks so much.

Ravi

Reply via email to