You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Grant Ingersoll (Commented) (JIRA)" <ji...@apache.org> on 2011/12/06 22:01:42 UTC

[jira] [Commented] (SOLR-1730) Solr fails to start if QueryElevationComponent config is missing

    [ https://issues.apache.org/jira/browse/SOLR-1730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13163834#comment-13163834 ] 

Grant Ingersoll commented on SOLR-1730:
---------------------------------------

If I move elevate.xml out of example/solr/conf, I get:
{quote}

Dec 6, 2011 3:59:17 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.NullPointerException
	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:167)
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1474)
	at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:59)
	at org.apache.solr.core.SolrCore$3.call(SolrCore.java:1251)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
{quote}

But I don't see the exception in the QEC that should be thrown by line 191.  If I setup a test locally using the solrconfig-elevate.xml, then I can get the Solr exception.
                
> Solr fails to start if QueryElevationComponent config is missing
> ----------------------------------------------------------------
>
>                 Key: SOLR-1730
>                 URL: https://issues.apache.org/jira/browse/SOLR-1730
>             Project: Solr
>          Issue Type: Bug
>          Components: SearchComponents - other
>    Affects Versions: 1.4
>            Reporter: Mark Miller
>            Assignee: Grant Ingersoll
>              Labels: newdev
>             Fix For: 3.6, 4.0
>
>
> QueryElevationComponent tries to do preload some data if its config file does not exist:
> {code}
>         if (!exists){
>           // preload the first data
>           RefCounted<SolrIndexSearcher> searchHolder = null;
>           try {
>             searchHolder = core.getNewestSearcher(false);
>             IndexReader reader = searchHolder.get().getReader();
>             getElevationMap( reader, core );
>           } finally {
>             if (searchHolder != null) searchHolder.decref();
>           }
>         }
> {code}
> This does not work though, as asking for the newest searcher causes a request to be submitted to Solr before its ready to handle it:
> {code}
>      [java] SEVERE: java.lang.NullPointerException
>      [java] 	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:173)
>      [java] 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
>      [java] 	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1317)
>      [java] 	at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:52)
>      [java] 	at org.apache.solr.core.SolrCore$3.call(SolrCore.java:1147)
>      [java] 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>      [java] 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> {code}
> The SearchHandler has not yet been core informed (as the QueryElevationComponent causes this as its getting core informed right before the SearchHandler) and so its components arraylist is still null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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