Rick,
I'd happy that it helps. You need to thank Varun who made [child]. There is
no performance impact for sure, it's a compromise or either nobody
considered it as an issue. You can raise a new JIRA and describe how it
should work in general and make everybody happy. On top of my head are
SOLR-8208 <https://issues.apache.org/jira/browse/SOLR-8208> and SOLR-7672
<https://issues.apache.org/jira/browse/SOLR-7672> which may interfere with
it. So, report your vision.

On Mon, Nov 30, 2015 at 7:01 PM, Rick Leir <richard.l...@canadiana.ca>
wrote:

> @Mikhail++ Yes! And the query below works.  As Mark Bennett notes,  "seems
> odd to need to specify filters again". Is there a performance impact,
> perhaps accessing the index twice?
>
> curl http://localhost:8983/solr/dorsetdata/query -d 'q={!
> parent which="content_type:parentDocument"} type_s:page AND charlie&
> wt=json&indent=true&
> fl=score,[child parentFilter=type_s:book childFilter="charlie"
> ],canonicalMaster,title,publisher,[docid]'
>
> Cheers -- Rick
>
> Re: Block Joins
> >         118348 by: Rick Leir
> >         118349 by: Mikhail Khludnev
> >
>
>
> > Subject: Re: Block Joins
> > Hello Rick,
>
> > If I got you right, it's worth to have a look at [child]
> >
>
> https://cwiki.apache.org/confluence/display/solr/Transforming+Result+Documents
> <
> https://cwiki.apache.org/confluence/display/solr/Transforming+Result+Documents
> >
> > Let me know if it works.
>
> On Sun, Nov 29, 2015 at 5:47 PM, Rick Leir <richard.l...@canadiana.ca>
> wrote:
>
> > Hi all,
> > I am new to Block Joins, and am trying to follow
> >
> >
>
> https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-BlockJoinQueryParsers
> >
> > This page shows two forms of block join
> >
> > syntax for this parser   q={!child of=<allParents>}<someParents>.
> > example query            q={!child
> > of="content_type:parentDocument"}title:lucene
> > return output is the children.
> >
> > syntax for this parser   q={!parent which=<allParents>}<someChildren>
> > example query            q={!parent
> > which="content_type:parentDocument"}comments:SolrCloud
> > return output is their parents.
> >
> >
> > Is it possible to get a list of the matching children, along with the
> > parent record? I have tried
> >
> >
> > $ curl http://localhost:8983/solr/dorsetdata/query -d '
> > q={!parent which="content_type:parentDocument"} type_s:page AND civilian&
> > wt=json&indent=true&fl=score,*,[docid]'
> >
> > This gives me just the parent record's fields.
> >
> > $ curl http://localhost:8983/solr/dorsetdata/query -d '
> > q={!child of="content_type:parentDocument"}&
> > wt=json&indent=true&fl=score,*,[docid]'
> >
> > This gives me a list of parent records.
> >
> > $ curl http://localhost:8983/solr/dorsetdata/query -d '
> > q={!child of="content_type:parentDocument"} type_s:book AND
> > publication_type:journal&
> > wt=json&indent=true&fl=score,*,[docid]'
> >
> > This gives me the child records but no info from the parent record.
>
> >
> > But what I need is fields from the matching children, along with fields
> > from the parent record.
> > TIA -- Rick
> >
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mkhlud...@griddynamics.com>

Reply via email to