Hi Solr users I would appreciate your inputs on how to handle a *mix *of *simple *and *nested *documents in the most easy and flexible way.
I need to handle: - simple documens: webpages, short articles etc. (approx. 90% of the content) - nested documents: books containing chapters etc. (approx 10% of the content) For simple documents I just want to present straightforward search results without any grouping etc. For the nested documents I want to group by book and show book title, book price etc. AND the individual results within the book. Lets say there is a hit on "Chapters 1" and "Chapter 7" within "Book 1" and a hit on "Article 1", I would like to present this: *Book 1 title* Book 1 published date Book 1 description - *Chapter 1 title* Chapter 1 snippet - *Chapter 7 title* CHapter 7 snippet *Article 1 title* Article 1 published date Article 1 description Article 1 snippet It looks like it is pretty straightforward to use the CollapsingQParser to collapse the book results into one result and not to collapse the other results. But how about showing the information about the book (the parent document of the chapters)? 1) Is there a way to do an* optional block join* to a *parent *document and return it together *with *the *child *document - but not to require a parent document? - or - 2) Do I need to require parent-child documents for everything? This is really not my preferred strategy as only a small part of the documents is in a real parent-child relationship. This would mean a lot of dummy child documents. - or - 3) Should I just denormalize data and include the book information within each chapter document? - or - 4) ... or is there a smarter way? Your help is very much appreciated. Cheers, Bjørn Axelsen