I don’t mean to be a contrarian but the error message isn’t clear. I believe it would be better to say the field is missing in the nested doc the? I believe error messages should be clear and actionable. In my case it was not clear as not all my documents are nested so this error was sporadic and confusing. Having a better idea on where to look would be very helpful.
-Cesar ------------------------ Sent from my iPhone > On Apr 3, 2023, at 5:53 PM, dmitri maziuk <dmitri.maz...@gmail.com> wrote: > > On 2023-04-03 6:27 PM, Cesar Delgado wrote: >> Thank you Sean, >> You are correct, the problem is definitely that nested field. I would still >> like to open a bug as the error message that is being returned is incorrect >> and confusing. > > Why? If you define 'account_acct' as required in the schema, then *every* > document has to have it. Including nested documents: child documents are > still documents and are still subject to all the schema constraints. > > Check the Fine Manual: > https://solr.apache.org/guide/8_11/indexing-nested-documents.html -- the > required field is "id" and every child document has it. > > (As a side note I find that using "compound ids" as per TFM and having > _nest_parent_ helps; and that updates don't work without defining both _root_ > and _nest_path_ as stored and docvalues=true.) > > I.e. you should either "flatten" your document structure or change the schema > -- with what you have, the error message is correct. > > Dima >