[ https://issues.apache.org/jira/browse/SOLR-13022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16937423#comment-16937423 ]
ASF subversion and git services commented on SOLR-13022: -------------------------------------------------------- Commit f43909111f02c76e86c4775fe5490ef1bdc40c4e in lucene-solr's branch refs/heads/branch_8x from Munendra S N [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=f439091 ] SOLR-13022: validate sort parameters in JSON facet after parsing * This fixes NPE in case of non-existent aggregate functions in sort/prelim_sort * validate sort direction > 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: Munendra S N > Priority: Major > Attachments: SOLR-13022.patch, 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-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org