I am using solr 9.1

Below is my field definition in schema

<field name="_root_" type="string" docValues="false" indexed="true"
stored="false"/>
  <field name="_src_" type="string" indexed="false" stored="true"/>
  <field name="_version_" type="plong" indexed="false" stored="false"/>
  <field name="id" type="string" multiValued="false" indexed="true"
required="true" stored="true"/>
  <field name="url" type="text_general" indexed="true" stored="true"
multiValued="false"/>
  <field name="content" type="text_general" multiValued="true"
indexed="true" stored="true"/>
  <field name="tenant" type="string" stored="true" indexed="true"
required="true" multiValued="false" />
  <field name="doc_status" type="string" stored="true" indexed="true"
 required="true"/>
  <dynamicField name="*" type="ignored" multiValued="true"/>


When I try to do atomic update using

curl -X POST 'http://localhost:8983/solr/readhub/update?commit=true' -H
'Content-Type: application/json' --data-binary '[
{
  "id": "doc1",
  "doc_status" : {"set":"published"}
} ]'


I am getting this error

 % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                 Dload  Upload   Total   Spent    Left
 Speed
100   825  100   765  100    60   3341    262 --:--:-- --:--:-- --:--:--
 3602{
  "responseHeader":{
    "rf":2147483647,
    "status":400,
    "QTime":226},
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException",

"error-class","org.apache.solr.update.processor.DistributedUpdateProcessor$DistributedUpdatesAsyncException",

"root-error-class","org.apache.solr.update.processor.DistributedUpdateProcessor$DistributedUpdatesAsyncException"],
    "msg":"Async exception during distributed update: Error from server at
http://localhost:8983/solr/readhub_shard2_replica_n6/: null\n\n\n\nrequest:
http://localhost:8983/solr/readhub_shard2_replica_n6/\nRemote error
message: [doc=null] missing required field: doc_status",
    "code":400}}

Please check the screen shot also


[image: image.png]

Reply via email to