You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "ananthesh (JIRA)" <ji...@apache.org> on 2018/02/09 22:02:01 UTC

[jira] [Created] (SOLR-11965) collapse.field on an unsupported field should throw 400 bad request

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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org