You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Munendra S N (Jira)" <ji...@apache.org> on 2019/09/20 16:17:00 UTC

[jira] [Updated] (SOLR-13022) JSON Faceting NPE & 500 Error when attempting to sort on non-existent agg (ie: typo)

     [ https://issues.apache.org/jira/browse/SOLR-13022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Munendra S N updated SOLR-13022:
--------------------------------
    Attachment: SOLR-13022.patch

> JSON Faceting NPE & 500 Error when attempting to sort on non-existent agg (ie: typo)
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-13022
>                 URL: https://issues.apache.org/jira/browse/SOLR-13022
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>            Priority: Major
>         Attachments: SOLR-13022.patch
>
>
> JSON Faceting does not provide good error handling in the event of a typo / non-existent agg stat name when sorting.  the parsing logic happily accepts the bogus sortVariable w/o validation, and the subsequent execution logic trows an NPE when it can't be found.
> Request...
> {noformat}
> curl http://localhost:8983/solr/techproducts/query -d 'rows=0&q=*:*&
> json.facet={
>   categories:{
>     type : terms,
>     field : cat,
>     sort : "xxxxx desc",
>   }
> }'
> {noformat}
> Response...
> {noformat}
> {
>   "responseHeader":{
>     "status":500,
>     "QTime":1,
>     "params":{
>       "q":"*:*",
>       "json.facet":"{\n  categories:{\n    type : terms,\n    field : cat,\n    sort : \"xxxxx desc\",\n  }\n}",
>       "rows":"0"}},
>   "response":{"numFound":32,"start":0,"docs":[]
>   },
>   "error":{
>     "trace":"java.lang.NullPointerException\n\tat org.apache.solr.search.facet.FacetFieldProcessor.lambda$findTopSlots$1(FacetFieldProcessor.java:287)
>     ...
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org