I just realized that Solr supports returning child records with the parent starting in version 4.9. I was on 4.8, so I will be upgrading to latest before continuing on this. I think it will then make it easier to show the results in Velocity (in case anyone else needs to do this).
Thanks, Josh Edwards -----Original Message----- From: Edwards, Joshua [mailto:joshua.edwa...@capitalone.com] Sent: Thursday, October 09, 2014 9:18 AM To: solr-user@lucene.apache.org Subject: RE: Using Velocity with Child Documents? Hey, Erick - Thanks for the response. Yes, I've played around with Velocity before, and I've been able to get some good results. However, with how Solr stores (and returns) child documents, I don't know of a way to get a response that is similar to the initial Json going in - with each parent document having the child documents underneath. I believe that I have to get the parent information, and then run another query for each record to get the child records. I didn't know if someone had done something similar. Thanks, Josh Edwards -----Original Message----- From: Erick Erickson [mailto:erickerick...@gmail.com] Sent: Wednesday, October 08, 2014 3:10 PM To: solr-user@lucene.apache.org Subject: Re: Using Velocity with Child Documents? Velocity is just taking the Solr response and displaying selected bits in HTML. So assuming the information you want is in the reponse packet (which you can tell just by doing the query from the browser) it's "just" a matter of pulling it out of the response and displaying it. Mostly when I started down this path I poked around the velocity directory it was just a bit of hunt int to figure things out, with some help from the Apache Velocity page. Not much help, but the short form is there's much of an example that I know of for your specific problem. Erick On Wed, Oct 8, 2014 at 8:54 AM, Edwards, Joshua <joshua.edwa...@capitalone.com> wrote: > Hi - > > I am trying to index a collection that has child documents. I have > successfully loaded the data into my index using SolrJ, and I have verified > that I can search correctly using the "child of" method in my fq variable. > Now, I would like to use Velocity (Solritas) to display the parent records > with some details of the child records underneath. Is there an easy way to > do this? Is there an example somewhere that I can look at? > > Thanks, > Josh Edwards > ________________________________________________________ > > The information contained in this e-mail is confidential and/or proprietary > to Capital One and/or its affiliates. The information transmitted herewith is > intended only for use by the individual or entity to which it is addressed. > If the reader of this message is not the intended recipient, you are hereby > notified that any review, retransmission, dissemination, distribution, > copying or other use of, or taking of any action in reliance upon this > information is strictly prohibited. If you have received this communication > in error, please contact the sender and delete the material from your > computer. ________________________________________________________ The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer. ________________________________________________________ The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.