Kailash
Kailash

Reputation: 21

Solr 9.0.0 [doc=null] missing required field in case of Partial Atomic Update - Bug in Solr code

In Apache Solr 9.0.0 while performing partial update it give below error

[doc=null] missing required field: id

This happens even after providing id field which is uniquefield as well.

While investigating we saw that it this error occurs because of below dynamicField defination in schema

<dynamicField name="*" type="text_general" indexed="false" stored="false" multiValued="false" docValues="false"/>

if we change dynamicField name to have suffix then it works fine, like name="*_i" But without changing dynamicField definition is there way to make partial atomic update work ?

UPDATE Found the commit in Solr which caused this - https://github.com/apache/solr/commit/5a9a34daedb34cb5fc5dc6f8c5c40a734bb7dacb?diff=split Bug is in JsonLoader. It got introduced in Solr 9.0.0

Workaround is to send Atomic Partial update in xml format instead of JSON -

<add>
  <doc>
    <field name="id">1011</field>
    <field name="CLIENT_TEAM" update="set">New Delhi</field>
  </doc>
  <doc>
    <field name="id">1022</field>
    <field name="CLIENT_TEAM" update="set">Mumbai</field>
  </doc>
</add>

Upvotes: 1

Views: 285

Answers (0)

Related Questions