You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Andreas Mock <an...@drumedar.de> on 2025/05/07 06:07:59 UTC

Weird error using config API v2 with Solr 9.8.1 to add UpdateProcessor (Followup of "Current core has 1206 fields, exceeding the max-fields limit of 1000")

Hi all,

after Chris Hostetter gave me some hints with my problem of exceeding a default limit, I wanted to change this limit using the config API as described in the documentation
(https://solr.apache.org/guide/solr/latest/configuration-guide/config-api.html)

When trying to change an existing updateprocessor or adding a new one I get an error message which I can't explain to myself:
Example:

curl -v  -X POST -H 'Content-type:application/json' -d '{"add-updateprocessor":{"maxFields":999,"class":"solr.NumFieldLimitingUpdateRequestProcessorFactory","warnOnly":"true","name":"test-fields"}}' http://<http://q-solr9-09.drumedar.intern:9983/api/collections/mca_test/config>solr-host:9983/api/collections/mca_test/config<http://q-solr9-09.drumedar.intern:9983/api/collections/mca_test/config>

I get the error:
{
  "responseHeader":{
    "status":400,
    "QTime":2
  },
  "errorMessages":["error processing commands, errors: [{errorMessages=[maxFields must be configured as a non-null <int>], add-updateprocessor={maxFields=999, class=solr.NumFieldLimitingUpdateRequestProcessorFactory, warnOnly=true, name=test-fields}}], \n"],
  "WARNING":"This response format is experimental.  It is likely to change in the future.",
  "error":{
    "metadata":["error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject","root-error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject"],
    "details":[{
      "errorMessages":["maxFields must be configured as a non-null <int>"],
      "add-updateprocessor":{
        "maxFields":999,
        "class":"solr.NumFieldLimitingUpdateRequestProcessorFactory",
        "warnOnly":"true",
        "name":"test-fields"
      }
    }],
    "msg":"error processing commands, errors: [{errorMessages=[maxFields must be configured as a non-null <int>], add-updateprocessor={maxFields=999, class=solr.NumFieldLimitingUpdateRequestProcessorFactory, warnOnly=true, name=test-fields}}], ",
    "code":400
  }

As you can see I declared maxFields to 999 as a JSON number. First I thought I gave the wrong structure, but as soon as I don't give  maxFields, I get an error stating that maxFileds is a required attribute. So, I'm pretty sure to build the right JSON structure.

Any help really appreciated.

Best regards
Andreas