Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11965

collapse.field on an unsupported field should throw 400 bad request

    XMLWordPrintableJSON

Details

    Description

      Currently w.r.t Collapsing Query Parser(https://lucene.apache.org/solr/guide/7_2/collapse-and-expand-results.html#collapsing-query-parser),  if an unsupported field or unknown field passed as a parameter to 'collapse.field' property, The system returns HTTP status code:500, even though the error msg is accurate. 

      curl "solr:8983/solr/core-name/select?q=*&fq=%7B%21collapse+field%3Dunknown-field%7D"
      
      {
        "responseHeader":{
          "zkConnected":true,
          "status":500,
          "QTime":1,
          "params":{
            "q":"*",
            "fq":"{!collapse field=unknown-field}"}},
        "error":{
          "msg":"org.apache.solr.common.SolrException: undefined field: \"unknown-field\"",
          "trace":"java.lang.RuntimeException: org.apache.solr.common.SolrException: undefined field: \"unknown-field\""}}
      

       

      On an unknown field, the system needs to return HTTP status code:400

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              antz ananthesh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: