You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Grant Ingersoll (JIRA)" <ji...@apache.org> on 2009/08/13 16:22:15 UTC
[jira] Closed: (SOLR-736) SolrCore.getSolrCore() may create a
SolrCore without a CoreContainer
[ https://issues.apache.org/jira/browse/SOLR-736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Grant Ingersoll closed SOLR-736.
--------------------------------
> SolrCore.getSolrCore() may create a SolrCore without a CoreContainer
> --------------------------------------------------------------------
>
> Key: SOLR-736
> URL: https://issues.apache.org/jira/browse/SOLR-736
> Project: Solr
> Issue Type: Bug
> Affects Versions: 1.3
> Reporter: Henri Biestro
> Assignee: Ryan McKinley
> Fix For: 1.4
>
>
> The method is deprecated but one can still initialize & start working this way.
> Potential fix could be:
> {code}
> @Deprecated
> public static SolrCore getSolrCore() {
> synchronized( SolrCore.class ) {
> if( instance == null ) {
> try {
> // sets 'instance' to the latest solr core
> CoreContainer.Initializer init = new CoreContainer.Initializer();
> instance = init.initialize().getCore("");
> } catch(Exception xany) {
> throw new SolrException( SolrException.ErrorCode.SERVER_ERROR,
> "error creating core", xany );
> }
> }
> }
> return instance;
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.