<delete><query>_root_:parent-id</query></delete>

чт, 26 июля 2018, 1:33 TK Solr <tksol...@sonic.net>:

> The child doc transformer worked great. Thank you.
>
> In my experiment, posting '<delete><id>parent-id</id></delete>' to the
> update
> end point only deleted the parent doc. Do I insert a complex join query
> from id
> to _version_ and delete all the docs of the matching _version_ ?
>
>
> On 7/24/18 9:27 PM, TK Solr wrote:
> > Thank you. I'll try the child doc transformer.
> >
> > On a related question, if I delete a parent document, will its children
> be
> > deleted also? Or do I have to have a parent_id field in each child so
> that the
> > child docs can be deleted?
> >
> >
> > On 7/22/18 10:05 AM, Mikhail Khludnev wrote:
> >> Hello,
> >> Check [child]
> >>
> https://lucene.apache.org/solr/guide/7_4/transforming-result-documents.html#child-childdoctransformerfactory
> >>
> >> or [subquery].
> >> Although, it's worth to put reference to it somewhere in blockjoin
> >> qparsers.
> >> Documentation patches are welcome.
> >>
> >>
> >> On Sun, Jul 22, 2018 at 10:25 AM TK Solr <tksol...@sonic.net> wrote:
> >>
> >>>
> https://lucene.apache.org/solr/guide/7_4/other-parsers.html#block-join-parent-query-parser
> >>>
> >>>
> >>> talks about {!parent which=<query that matches all parent docs>}
> <query on
> >>> child
> >>> docs>, which returns parent docs only, and
> >>> {!child of=<query that matches all parent docs>} <query on parent
> docs>,
> >>> which
> >>> returns child docs only.
> >>>
> >>> Is there a way to retrieve the matched documents in the original,
> nested
> >>> form?
> >>> Using the sample document, is there way to get:
> >>>
> >>> <doc>
> >>>     <field name="id">1</field>
> >>>     <field name="title">Solr has block join support</field>
> >>>     <field name="content_type">parentDocument</field>
> >>>     <doc>
> >>>         <field name="id">2</field>
> >>>         <field name="comments">SolrCloud supports it too!</field>
> >>>     </doc>
> >>> </doc>
> >>>
> >>> rather than just the parent or the child docs?
> >>>
> >>>
> >>>
> >
>
>

Reply via email to