Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 641D919DB1 for ; Tue, 29 Mar 2016 10:11:31 +0000 (UTC) Received: (qmail 53150 invoked by uid 500); 29 Mar 2016 10:11:26 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 53078 invoked by uid 500); 29 Mar 2016 10:11:26 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 52807 invoked by uid 99); 29 Mar 2016 10:11:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2016 10:11:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A7EB12C14FB for ; Tue, 29 Mar 2016 10:11:25 +0000 (UTC) Date: Tue, 29 Mar 2016 10:11:25 +0000 (UTC) From: "Pascal Chollet (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-8851) ClassCastException in SearchHandler MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-8851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15215801#comment-15215801 ] Pascal Chollet commented on SOLR-8851: -------------------------------------- It can be reproduced with a wildcard query matching to really many terms. In our case the query matches to something like 3 million terms - {{QueryComponent.process()}} finishes without timeout, but then the timeout happens in {{FacetComponent.process()}} This is the stacktrace when the exception is being thrown: {code} at org.apache.lucene.index.ExitableDirectoryReader$ExitingReaderException.(ExitableDirectoryReader.java:47) at org.apache.lucene.index.ExitableDirectoryReader$ExitableTermsEnum.checkAndThrow(ExitableDirectoryReader.java:166) at org.apache.lucene.index.ExitableDirectoryReader$ExitableTermsEnum.next(ExitableDirectoryReader.java:178) at org.apache.lucene.search.MultiTermQueryConstantScoreWrapper$1.rewrite(MultiTermQueryConstantScoreWrapper.java:181) at org.apache.lucene.search.MultiTermQueryConstantScoreWrapper$1.scorer(MultiTermQueryConstantScoreWrapper.java:213) at org.apache.lucene.search.BoostQuery$1.scorer(BoostQuery.java:168) at org.apache.lucene.search.DisjunctionMaxQuery$DisjunctionMaxWeight.scorer(DisjunctionMaxQuery.java:177) at org.apache.lucene.search.DisjunctionMaxQuery$DisjunctionMaxWeight.scorer(DisjunctionMaxQuery.java:177) at org.apache.lucene.queries.function.BoostedQuery$BoostedWeight.scorer(BoostedQuery.java:99) at org.apache.lucene.search.DisjunctionMaxQuery$DisjunctionMaxWeight.scorer(DisjunctionMaxQuery.java:177) at org.apache.solr.search.FilterImpl$FilterSet.iterator(SolrIndexSearcher.java:2523) at org.apache.solr.search.SolrIndexSearcher.getDocSet(SolrIndexSearcher.java:1030) at org.apache.solr.request.SimpleFacets.computeDocSet(SimpleFacets.java:266) at org.apache.solr.request.SimpleFacets.parseParams(SimpleFacets.java:225) at org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:610) at org.apache.solr.handler.component.FacetComponent.getFacetCounts(FacetComponent.java:295) at org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:257) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:281) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2073) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:457) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:223) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) {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-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org