[ https://issues.apache.org/jira/browse/SOLR-8851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15218651#comment-15218651 ]
Marius Grama edited comment on SOLR-8851 at 3/31/16 6:42 AM: ------------------------------------------------------------- Issue can be reproduced (quite often) on the _techproducts_ example collection with the following query : {noformat} http://localhost:8983/solr/techproducts/select?q=*:*&wt=json&indent=true&facet=true&facet.query={!tag=q1}manufacturedate_dt:[2006-01-01T00:00:00Z%20TO%20NOW]&facet.query={!tag=q1}price:[0%20TO%20100]%20&timeAllowed=1 {noformat} Moreover I notice now that also for the terms query : {noformat} http://localhost:8983/solr/techproducts/terms?terms.fl=name&timeAllowed=1 {noformat} the _result_ element is delivered only (even though it is not needed) when the query times out : {noformat} <response> <lst name="responseHeader"> <bool name="partialResults">true</bool> <int name="status">0</int> <int name="QTime">8762</int> </lst> <lst name="terms"> <lst name="name"/> </lst> <result name="response" numFound="0" start="0"/> </response> {noformat} I am further investigating whether SearchHandler lines 294-303 can be avoided : {code} SolrDocumentList r = (SolrDocumentList) rb.rsp.getValues().get("response"); if(r == null) r = new SolrDocumentList(); r.setNumFound(0); rb.rsp.add("response", r); if(rb.isDebug()) { NamedList debug = new NamedList(); debug.add("explain", new NamedList()); rb.rsp.add("debug", debug); } {code} was (Author: mariusneo): Issue can be reproduced (quite often) on the _techproducts_ example collection with the following query : {noformat} http://localhost:8983/solr/techproducts/select?q=*:*&wt=json&indent=true&facet=true&facet.query={!tag=q1}manufacturedate_dt:[2006-01-01T00:00:00Z%20TO%20NOW]&facet.query={!tag=q1}price:[0%20TO%20100]%20&timeAllowed=1 {noformat} Moreover I notice now that also for the terms query : {noformat} http://localhost:8983/solr/techproducts/terms?terms.fl=name&timeAllowed=1 {noformat} the _result_ element is delivered only (even thought it is not needed) when the query times out : {noformat} <response> <lst name="responseHeader"> <bool name="partialResults">true</bool> <int name="status">0</int> <int name="QTime">8762</int> </lst> <lst name="terms"> <lst name="name"/> </lst> <result name="response" numFound="0" start="0"/> </response> {noformat} I am further investigating whether SearchHandler lines 294-303 can be avoided : {code} SolrDocumentList r = (SolrDocumentList) rb.rsp.getValues().get("response"); if(r == null) r = new SolrDocumentList(); r.setNumFound(0); rb.rsp.add("response", r); if(rb.isDebug()) { NamedList debug = new NamedList(); debug.add("explain", new NamedList()); rb.rsp.add("debug", debug); } {code} > ClassCastException in SearchHandler > ----------------------------------- > > Key: SOLR-8851 > URL: https://issues.apache.org/jira/browse/SOLR-8851 > Project: Solr > Issue Type: Bug > Affects Versions: 5.4.1 > Reporter: Pascal Chollet > > When there is a query timeout in non-distrub mode, {{SearchHandler}} is > throwing a {{ClassCastException}}: > {code}java.lang.ClassCastException: org.apache.solr.response.ResultContext > cannot be cast to org.apache.solr.common.SolrDocumentList > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:293) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156) > ...{code} > The problem can be reproduced if any component running after > {{QueryComponent}} times out - in our case it is {{FacetComponent}} which > throws a {{ExitingReaderException}}. > {{SearchHandler:293}} expects a {{SolrDocumentList}} in {{rsp.response}}, but > {{QueryComponent}} did add a {{ResultContext}} instead. > It looks like this is not a problem, if the {{QueryComponent}} itself is > timing out, as rsp.response is null in that case. It's only a problem if a > component after {{QueryComponent}} is timing out. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org