ananthesh created SOLR-11965:
--------------------------------

             Summary: collapse.field on an unsupported field should throw 400 
bad request
                 Key: SOLR-11965
                 URL: https://issues.apache.org/jira/browse/SOLR-11965
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: SolrCloud
    Affects Versions: 7.2, 6.7
            Reporter: ananthesh


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. 
{code:java}
curl 
"solr:8983/solr/core-name/select?q=*&fq=%7B%21collapse+field%3Dunknown-field%7D"
{code}
{code:javascript}
{
  "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\""}}
{code}
 

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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to