You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2018/11/29 15:38:00 UTC
[jira] [Created] (SOLR-13022) JSON Faceting NPE & 500 Error when
attempting to sort on non-existent agg (ie: typo)
Hoss Man created SOLR-13022:
-------------------------------
Summary: 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
Security Level: Public (Default Security Level. Issues are Public)
Reporter: Hoss Man
Assignee: Hoss Man
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
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org