Hi Adi,

thank you for your reply!  Although I have to admit that this is not the
response that I was hoping for 😊.

Upgrading to Solr 8 is currently not possible for us because we found
multiple issues when doing so  (see
http://mail-archives.apache.org/mod_mbox/lucene-solr-user/202005.mbox/%3Ce7dc73d4be2ac35404db0f6cfb75f905%40mail.gmail.com%3E).
We have now implemented a workaround and send the whole document with
ChildDocs to Solr instead of doing an atomic update. This works as expected
but is significantly slower.

Regards
Ludger

---
Beste Arbeitgeber ITK 2020 - 1. Platz für QAware
ausgezeichnet von Great Place to Work
---

Ludger Steens
Softwarearchitekt


QAware GmbH
Aschauer Straße 32
81549 München, Germany
Mobil +49 175 7973969
mailto:ludger.ste...@qaware.de
https://www.qaware.de


Geschäftsführer: Christian Kamm, Johannes Weigend, Dr. Josef Adersberger
Registergericht: München
Handelsregisternummer: HRB 163761
---
-----Ursprüngliche Nachricht-----
Von: Kaminski, Adi <adi.kamin...@verint.com>
Gesendet: Sonntag, 7. Juni 2020 08:45
An: solr-user@lucene.apache.org
Betreff: RE: Atomic updates with nested documents

Hi Ludger,
We had the same issue with Solr 7.6, and after discussing with the community
we've found out that this partial update of parent document without "harm"
parent-child association can work only on Solr 8.1 or higher, and It also
requires some prerequisites.

See the below item and it's last comments with details:
https://issues.apache.org/jira/browse/SOLR-12638?focusedCommentId=16894628&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16894628

Eventually we have move to Solr 8.3 and it's working there as expected with
the above mentioned changes.

Regards,
Adi

-----Original Message-----
From: Ludger Steens <ludger.ste...@qaware.de>
Sent: Friday, June 5, 2020 3:24 PM
To: solr-user@lucene.apache.org
Subject: Atomic updates with nested documents

Dear Community,



I am using Solr 7.7 and I am wondering how it is possible to do a partial
update on nested documents / child documents.

Suppose I have committed the following documents to the index:

[

  {

    "id": "1",

    "testString": "1",

    "testInt": "1",

    "_childDocuments_": [

      {

        "id": "1.1",

        "child_type": "child_a",

        "testString": "1.1",

        "testInt": "1"

      },

      {

        "id": "1.2",

        "child_type": "child_a",

        "testString": "1.1",

        "testInt": "1"

      }

    ]

  }

]

<uniqueKey> is id, all fields are indexed.



Now I want to update testInt to 2 on the parent document without losing the
parent child relation (ChildDocTransformerFactory should still produce
correct results).

I tried the following variants, both not successful:



*Variant 1:*

Sending the following update document to the update-Endpoint

[

  {

    "id": "1",

    "testInt": {

      "set": "2"

    }

  }

]

The parent document is updated, but the ChildDocTransformerFactory does not
return any child documents



*Variant 2:*

Sending the following update document to the update-Endpoint

[

  {

    "id": "1",

    "testInt": {

      "set": "2"

    },

    "_childDocuments_": [

      {

        "id": {

          "set": "1.1"

        }

      },

      {

        "id": {

          "set": "1.2"

        }

      }

    ]

  }

]

Same result: Parent is updated, but ChildDocTransformerFactory does not
return any child documents





Is there any other way of doing a partial update without losing the parent
child relation?

Resending the complete document with all attributes and children would work
but is inefficient for us (we had to load all documents from Solr before
resending them).



Thanks in advance for your help



Ludger


------------------------------

*„Beste Arbeitgeber ITK 2020“ - 1. Platz für QAware* ausgezeichnet von Great
Place to Work
<https://www.qaware.de/news/great-place-to-work-deutschlands-beste-arbeitgeber-2020/>
------------------------------

Ludger Steens
Softwarearchitekt

QAware GmbH
Aschauer Straße 32
81549 München, Germany
Mobil +49 175 7973969
ludger.ste...@qaware.de
www.qaware.de
------------------------------

Geschäftsführer: Christian Kamm, Johannes Weigend, Dr. Josef Adersberger
Registergericht: München
Handelsregisternummer: HRB 163761


This electronic message may contain proprietary and confidential information
of Verint Systems Inc., its affiliates and/or subsidiaries. The information
is intended to be for the use of the individual(s) or entity(ies) named
above. If you are not the intended recipient (or authorized to receive this
e-mail for the intended recipient), you may not use, copy, disclose or
distribute to anyone this message or any information contained in this
message. If you have received this electronic message in error, please
notify us by replying to this e-mail.

Reply via email to