Thanks Erick & Alessandro. I am querying the collections by including '&collection=c1,c2' syntax in the query. The suggestion of adding an additional field to the schema works. I configured this additional field to hold the collection's name and now the result from the collection includes the name.
-- Jagrut On Fri, Jun 23, 2017 at 7:51 AM, Erick Erickson <erickerick...@gmail.com> wrote: > Hmmmm, you might be able to use a DocTransformer. Hmm, in fact that > would work if you can keep the two separate. It just injects fields > into the docs when they're being output. It would be the world's > simplest transformer if it injected a hard-coded collection name > (you'd have to have unique transformers per collection). With a little > more work it should be possible to get the collection name from the > available data. > > Best, > Erick > > On Fri, Jun 23, 2017 at 2:21 AM, alessandro.benedetti > <a.benede...@sease.io> wrote: > > I second Erick, > > it would be as easy as adding this field to the schema : > > > > <field name="collection" type="string" > > indexed="false" stored="true" default="<your > > collection name>"/> > > > > If you are using inter collections queries, just be aware there a lot of > > tricky and subtle problems with it ( such as unique Identifier must have > > same field name, distributed IDF inter collections ect ect) > > I am preparing a blog post related that. > > I will keep you updated. > > > > Cheers > > > > > > > > ----- > > --------------- > > Alessandro Benedetti > > Search Consultant, R&D Software Engineer, Director > > Sease Ltd. - www.sease.io > > -- > > View this message in context: http://lucene.472066.n3. > nabble.com/Collection-name-in-result-tp4342474p4342501.html > > Sent from the Solr - User mailing list archive at Nabble.com. >