lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zheng Lin Edwin Yeo <edwinye...@gmail.com>
Subject Re: Returning parent's field which searching for child
Date Tue, 09 Aug 2016 15:30:15 GMT
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 August 2016 at 22:03, Mikhail Khludnev <mkhl@apache.org> wrote:

> 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 <edwinyeozl@gmail.com>
> wrote:
>
> > 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:parent&child_filter=(contentType:
> > child+AND+childNo_s:123456)
> >
> >
> > Regards,
> > Edwin
> >
> >
> > On 9 August 2016 at 18:23, Mikhail Khludnev <mkhl@apache.org> wrote:
> >
> > > Hello Edwin,
> > > Have you tried to combine q={!parent ..}... &fl=*,[child ...] ?
> > >
> > > On Tue, Aug 9, 2016 at 12:59 PM, Zheng Lin Edwin Yeo <
> > edwinyeozl@gmail.com
> > > >
> > > 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
> > 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, so this search will not
> > > return
> > > > any parent's record. But if I want to return like says its parent's
> ID
> > > > together with the above query, is it possible to be done?
> > > >
> > > > I'm using Solr 6.1.0.
> > > >
> > > > Regards,
> > > > Edwin
> > > >
> > >
> > >
> > >
> > > --
> > > Sincerely yours
> > > Mikhail Khludnev
> > >
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message