Re: Returning parent's field which searching for child

2016-08-09 Thread Zheng Lin Edwin Yeo
If I drop childNo_s:123456 part, the result will return both parent and child, which is what I want. But this will match all the children, since the only filter now is contentType:child. It didn't work if I put only childNo_s:123456 and remove the contentType:child part. Regards, Edwin On 9 Aug

Re: Returning parent's field which searching for child

2016-08-09 Thread Mikhail Khludnev
I wonder why {!parent} doesn't have subordinate clause. I suggest to drop childNo_s:123456 part of child filter just to get something to start from. On Tue, Aug 9, 2016 at 4:09 PM, Zheng Lin Edwin Yeo wrote: > Hi Mikhail, > > Thanks for your reply. > I tried this, but it only returns the parent'

Re: Returning parent's field which searching for child

2016-08-09 Thread Zheng Lin Edwin Yeo
Hi Mikhail, Thanks for your reply. I tried this, but it only returns the parent's record and not the child record. http://localhost/solr/collection1/select?q={!parent+which%3D%22contentType:parent%22}&fl=*,[child+parentFilter%3D$parent_filter+childFilter%3D$child_filter]&parent_filter=contentType

Re: Returning parent's field which searching for child

2016-08-09 Thread Mikhail Khludnev
Hello Edwin, Have you tried to combine q={!parent ..}... &fl=*,[child ...] ? On Tue, Aug 9, 2016 at 12:59 PM, Zheng Lin Edwin Yeo wrote: > Hi, > > Would like to check, is it possible to return certain fields from parent's > record, when we are searching for fields that are only contained in chil

Returning parent's field which searching for child

2016-08-09 Thread Zheng Lin Edwin Yeo
Hi, Would like to check, is it possible to return certain fields from parent's record, when we are searching for fields that are only contained in child records. For example, for this query: http://localhost:8983/solr/collection1/select?q=childField:123 The child field can only be found in child